All Collections
Ad Units and Code Snippets
Using Adsterra Ads with Cloudflare
Using Adsterra Ads with Cloudflare

Learn how to prevent RocketLoader from adding extra text to Adsterra's advertising code

Ana M avatar
Written by Ana M
Updated over a week ago

💡 Cloudflare has a feature called "RocketLoader" which causes changes to our javascript code and therefore our script works in the wrong way or does not work at all, affecting your impressions and revenue.

Here is an example of how RocketLoader changes our script.

Our script:

<script type='text/javascript' src='//pl123456.puhtml.com/82/6d/f3/826df33e1880e1ab086c8406879dc14e.js'></script>

Our script after it was affected by RocketLoader:

<script type="text/rocketscript" data-rocketsrc='//pl123456.puhtml.com/82/6d/f3/826df33e1880e1ab086c8406879dc14e.js'></script>

In order to prevent RocketLoader from adding extra text to our code, you should add data-cfasync="false" attribute into our code just before the type attribute:

<script data-cfasync="false" type='text/javascript' src='//pl123456.puhtml.com/82/6d/f3/826df33e1880e1ab086c8406879dc14e.js'></script>

Did this answer your question?