Categories
Coding Websites

Stop CloudFlare from injecting beacon

I have a client that uses CloudFlare, which I recommend, not only because I approve of their service, having been using it since they started up, but I love how they are fighting patent trolls!

So where was I? Oh, right! The client turned on Web Analytics which started causing a ruckus with some pages that provided API-like responses to certain automated functions by injecting a link of code to the rendered html output.

So in this case we turned off “automatic setup” for that site using CF dashboard -> analytics & logs -> web analytics -> manage site link

Now I bet there is another more elegant solution like making sure the page outputs a different content-type or something that would prevent this, but for a quick fix on this issue, doing the above works.