How to make sure CloudFlare's Rocket Loader ignores your tracking scripts

If you are using CloudFlare, especially their Rocket Loader javascript loader it is likely that you are having problems with your Post Affiliate click or sale tracking javascripts.

Fortunately there is a way to make sure that your tracking scripts aren't processed by Rocket Loader. According to CloudFlare's support documentation it is enough to add data-cfasync="false" attribute to your javascripts which should be ignored.

Here is an example of a click tracking code with this parameter added on all required positions:

<script data-cfasync="false" type="text/javascript">
document.write(decodeURI("%3Cscript data-cfasync='false' id='pap_x2s6df8d' src='" + (("https:" == document.location.protocol) ? "https://" : "https://") +
"' type='text/javascript'%3E%3C/script%3E"));
<script data-cfasync="false" type="text/javascript">
try {
} catch (err) { }

Make sure you add the attribute on all 3 highlighted positions.