Making it compatible with Cloudflare Rocket Loader
-
Plugin works great, but in case the site is using Cloudflare, with Rocket Loader functionality turned on, this will prevent GTM tag to be fired.
To prevent this from happening, all we need to do is replace<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
with
<script data-cfasync="false">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
There are no filters before this it echoed, so can’t do it without editing the plugin file itself.
It would be a great addition to the plugin since a lot of people running WordPress sites are using Cloudflare as well.
- The topic ‘Making it compatible with Cloudflare Rocket Loader’ is closed to new replies.