Local Google Analytics (with CDN support)

Unmaintained Local Google Analytics (with CDN support) 1.0.0

No permission to download
Compatible XF 1.x versions
  1. 1.5
Visible branding
No
IMPORTANT: This resource is unsupported!

Based on this blog entry, I decided to create an add-on, as I finally wanted to fix the “Leverage Browser Caching” warning you get when you perform a speed test on your website.

What does it do?
It replaces the URL in the google_analytics template with the URL of your local analytics.js.

Features:
  • Enable/disable local Google Analytics
  • If you defined a CDN in your config.php, the analytics.js will be served via your CDN automatically
  • Cron task to automatically fetch analytics.js from Google and update your local file
Installation:
Unzip the archive and upload the contents of the "upload" folder to your forum root directory. Then go to "List Add-ons" -> "+Install Add-on", choose the unzipped .xml-file and import it.

Configuration:
Go to "Options" -> "Statistics & Metrics", enable the add-on and set the absolute path to your analytics.js (e.g. /var/www/YOURDOMAIN/httpdocs/js/trg/local_ga/analytics.js):
screenshot_options.webp

The cron task runs once a month (at the 15th during the night). You may change it to your needs.

Result:

Before
screenshot_console_before.webp


After
screenshot_console_after.webp


Just perform a speed test and you will see that the “Leverage Browser Caching” warning vanished.

Translations:
Coming soon.
Author
Finexes
Downloads
33
Views
959
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from Finexes

Latest reviews

Thanks. Great assistance for improving site load times and increasing user experience across the site.
Finexes
Finexes
Thanks for your kind review, Mouth! :)
Top Bottom