Title: CloudFlare RocketLoader Breaks Scripts
Last modified: August 31, 2016

---

# CloudFlare RocketLoader Breaks Scripts

 *  Resolved [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [10 years ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/)
 * Hello there!
 * Just resurrecting this thread here:
 * [https://wordpress.org/support/topic/cloudflare-rocketlauncher-breaks-this-plugin?replies=8#post-7998460](https://wordpress.org/support/topic/cloudflare-rocketlauncher-breaks-this-plugin?replies=8#post-7998460)
 * …specifically your comment:
 * > Would it help if I would add data-cfasync=”false” to each of my scripts?
 * I’m not sure if there’s another way around this, but Rocket Loader simply will
   not work with your plugin.
 * Thanks for your help!
 * [https://wordpress.org/plugins/duracelltomi-google-tag-manager/](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [icyapril](https://wordpress.org/support/users/icyapril/)
 * (@icyapril)
 * [10 years ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394515)
 * Hi;
 * RocketLoader patches many bugs on HTTP/1.1 which have been fixed in HTTP/2.
 * Many of the benefits of RocketLoader come from using HTTP/2. In order to use 
   HTTP/2 on CloudFlare all you need to do is enable SSL connections, CloudFlare
   allows you to do this via Universal SSL and redirect all HTTP traffic to HTTPS.
 * Above this, Google boosts sites ranking if they use HTTPS. If you can’t use CloudFlare’s
   Full SSL mode, you can [configure CloudFlare to use Flexible SSL with WordPress](https://jonnyjordan.com/blog/how-to-setup-cloudflare-flexible-ssl-for-wordpress/).
 * You can then disable RocketLoader and your site should work great.
 *  Thread Starter [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [10 years ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394521)
 * [@icyapril](https://wordpress.org/support/users/icyapril/):
 * The reason I use Rocket Loader is because it *does* have an impact on load times.
   I use [https://gtmetrix.com](https://gtmetrix.com) and I notice a multiple percentage
   increase (sometimes close to 10%) when I have Rocket Loader enabled.
 * I have HTTP/2 active: [http://d.pr/i/17Njo](http://d.pr/i/17Njo)
 * I have FULL SSL on: [http://d.pr/i/1d1rs](http://d.pr/i/1d1rs)
 * I’m also on the CloudFlare network (I have the appropriate Orange Clouds on):
   [http://d.pr/i/1d8ML](http://d.pr/i/1d8ML)
 * And my domain is SSL / HTTPS.
 * Still have trouble when I turn Rocket Loader on.
 * When I turn Rocket Loader **on**, The Google Tag Assistant (in Chrome) says that
   GTM isn’t active. When I turn Rocket Loader **off**, it becomes active again.
 *  Thread Starter [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [10 years ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394522)
 * Additionally, when I use Rocket Loader on other sites (without the “DuracellTomi’s
   Google Tag Manager for WordPress” plugin), I’m able to deactivate Rocket Loader
   using this script modifier:
 * `data-cfasync="false"`
 * I can’t figure out how to add this with “DuracellTomi’s Google Tag Manager for
   WordPress” though.
 * Anyone know how? Maybe with a Function in functions.php?
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394732)
 * Hi Everyone,
 * I added this attribute into the core, I hope it will help you with Rocker Loader.
 * Thomas
 *  Thread Starter [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394733)
 * That’s great [@duracelltomi](https://wordpress.org/support/users/duracelltomi/)
 * So is that live in the current version already?
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394734)
 * Next version is (really) scheduled to be released next week.
 *  [Watch Teller](https://wordpress.org/support/users/watchteller/)
 * (@watchteller)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394741)
 * [@chris](https://wordpress.org/support/users/chris/) M.,
 * At duracelltomi-google-tag-manager > “public” folder > frontend.php
 * 1. Line 400 script = <script data-cfasync=”false”>(function(w,d,s,l,i){w[l]=w[
   l]||[];w[l].push({\’gtm.start\’:
    2. Line 490 script = <script data-cfasync=”
   false” type=”text/javascript”> 3. Line 519 script = <script data-cfasync=”false”
   type=”text/javascript”>’;
 * Hope help
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394753)
 * Hi Everyone,
 * The new version of the plugin adds data-cfasync=false to the codes, please let
   me know if you are satisfied with this solution or you have something to add.
 * Thanks,
    Thomas
 *  Thread Starter [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394754)
 * Awesome!!! So far it’s looking like it’s working with Rocket Loader now! Thanks
   for the update(s) (saw the 1.3.1 one today as well).
 *  Thread Starter [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * (@thinkdeep)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394755)
 * I’m going to mark this as Resolved.
 * Like I said, so far so good, from what I can tell.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘CloudFlare RocketLoader Breaks Scripts’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

## Tags

 * [gtm](https://wordpress.org/support/topic-tag/gtm/)
 * [Rocket Loader](https://wordpress.org/support/topic-tag/rocket-loader/)

 * 10 replies
 * 4 participants
 * Last reply from: [Chris M.](https://wordpress.org/support/users/thinkdeep/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/cloudflare-rocketloader-breaks-scripts/#post-7394755)
 * Status: resolved