WP Rocket 3.1: Optimize Google Analytics, Inline & External JavaScript and more!

What could be more thrilling than the discovery of water on Mars?? Here at Mission Control, a close second is a new version of WP Rocket!

Version 3.1 is now in orbit and ready for docking with your website. You won’t want to miss these stellar new features!

Host Google Analytics Locally

Unless you’re a huge fan of irony, you may be tired of Google telling you to “leverage browser caching” for their own Analytics tracking files.Host Google Analytics Locally Unless you’re a huge fan of irony, you may be tired of Google telling you to “leverage browser caching” for their own Analytics tracking files. In 3.1 we’ve introduce a new one-click, Google Tracking add-on to take care of hosting these files locally. This means that the correct browser caching rules can be applied… “Leverage browser caching” warnings begone! Activate it in: Add-ons > Google Tracking

In 3.1 we’ve introduce a new one-click, Google Tracking add-on to take care of hosting these files locally. This means that the correct browser caching rules can be applied… “Leverage browser caching” warnings begone!

Activate it in: Add-ons > Google Tracking

WP Rocket - Google Tracking Add-on

If you use a CDN that means you’ll be able to serve these files from your CDN 🙂

More details

Minify & Combine Inline JavaScript and External JavaScript

Another pain point of Google PageSpeed is the infamous “remove render-blocking JavaScript” message.

In 3.1 we’ve revamped our minify and combine JS feature. This one should make getting rid of render-blocking JS messages a breeze. Now when you activate Combine JavaScript Files, we take all inline JS code and all external JS files and include them in one combined JS file loaded in the footer of your site. Voila, no more render-blocking!

Activate it in: File Optimization > JavaScript Files > Minify, Combine

WP Rocket - Minify and Combine JavaScript

Optimization of WooCommerce’s get refreshed fragments

If you run speed tests for your site you’ll be used to seeing that long bar for:
?wc-ajax=get_refreshed_fragments

amerce -get_refreshed_fragments

In WP Rocket 3.1, that request will be optimized to reduce the load time.

Activate it in: In 3.1, WP Rocket automagically optimizes and shortens this request. There’s no need to activate this feature, it just happens!

More details

Compatibility for WPML and WooCommerce Multilingual

We also have an important new compatibility to announce between WPML and WooCommerce Multilingual. Now changing currency is caching compatible so that prices are correctly displayed. Meteor-sized thanks go to David Watkins for making that happen!

Requirements

In WP Rocket 3.1 the minimum WordPress requirement has been increased from 4.2 to 4.7.  The PHP requirement remains 5.4 or higher.

Version 3.1 also contains numerous other bug fixes and enhancements!
Read all the details in our changelog

If you’re a customer of WP Rocket, consider joining our Facebook community for WP Rocket users. Share your success stories as well as product feedback.

About

Lucy is a long time user of WordPress, (since 2004) and has provided WordPress training for bloggers and businesses for over 5 years. She has spoken at several WordCamps and is an active member of the WordPress community. You can follow @webtw on Twitter.

14 comments

Comment

Hey Rocket Team,

I’m interested in the Google Analytics addon feature. However, my concern is that I’m currently using the MonsterInsights Pro version for my Google Analytics tracking with Enahnced eCommerce and everything else.

How compatible will it be if I attempt to run both at the same time?

Cheers,

Matt

Hi Rocketeers,

can you give us a bit more insight into what you do behind the curtains when it comes to the new GA feature? The 2 hour expiry date is probably no accident by Google. Have you looked into how frequently Google changes their tracker’s code? How do you handle updates to the GA tracker. Do you constantly check and update the local version? Would be great to know how you approached this feature and made sure that it doesn’t cause any problems down the line.

cheers,
Dave

Google Analytics, If there is more for facebook then great. 🙂

Hello
what will happen if Google will change the logic of the js files?
https://www.google-analytics.com/analytics.js
https://www.googletagmanager.com/gtag/js
Thank you
mauro

@David Mondok
There is a cron job that will update the Analytics local cache every week.

My problem is that the feature does not work on my 4 sites. Google Insights show still the Browser Caching problem.

Is it possible to *not* have inline js combined and minified? I have a couple of chunks of js inline and the minification/combination is breaking it 🙁

    Hi Jim ✋

    As we are now including external files, having inline JS is mandatory for compatibility. If you have any issues, you can contact our support team to report your bug. We could find which inline script is problematic and auto-exclude it into a new minor version of WP Rocket!

Hi,

does the new “Add-ons > Google Tracking” feature also work when I use the Google Tag Manager Script?

Best Regards Marc

Leave a Reply

Your email address will not be published. Required fields are indicated by *