sábado, 18 de mayo de 2019

CloudFlare ad codes work correctly?

In case you use CloudFlare. Will data codes work correctly?

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 what RocketLoader does to 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 a tiny piece of text into our default code: just add data-cfasync="false" attribute into our code just before the type attribute

Example:

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

0 comentarios:

Publicar un comentario

Translate = traduce

Nuestros ultimos