WordPress.org

Plugin Directory

Local Google Analytics for WordPress – caches external requests

Local Google Analytics for WordPress – caches external requests

Description

This plugin helps to plug in Google Analytics code to the website pages without affecting the theme code. All you have to do is to enter the tracking code. That’s all. Unlike other plugins, this one cares about your website performance and caches Google Analytics scripts.

How does plugin cache Google Analytics scripts and why?

When you activate and fill in plugin settings, it downloads remote file named analytics.js and places it to the Cache folder on your hosting (server). This file is updated once a day – it helps to avoid external requests to the Google remote server and speeds up the website pages.
Also if you want to gain 100 performance rating on Google Pagespeed Insights, then you’ll definitely need to cache Google Analytics, otherwise you’ll get a warning.

PLUGIN FEATURES

  • Helps to place analytics code to the website header or footer.
  • Monitors bounce rates. The point is that you set up the event triggered after a user spends a certain amount of time on the landing page, telling Google Analytics not to consider these users as a bounce. The user can visit your website, find all necessary information (for example, phone number), and then – simply close the website without visiting other pages. If the bounce rate hasn’t been adjusted, then this user is considered as a bounce, even though he had a successful experience. By defining time limits as from when the user should be considered as a bounce, you get more accurate performance of the user experience (for example, whether he’s been able to find what he was looking for or not).
  • Define the analytics code position. Google Analytics code loads prior to other scripts and JavaScript code by default. But if you set up the value 100, for example, then the Google Analytics code will be loaded after all scripts. Adjusting the priority helps to set up the code’s position on the page.
  • Disable all Display Network functions. Find more: https://developers.google.com/analytics/devguides/collection/analyticsjs/display-features
  • Use anonymous IP address (required by the law in some countries). More details: (https://support.google.com/analytics/answer/2763052)
  • Track administrators. You can disable tracking for administrators’ activities and get more accurate statistics.
  • Do not update the analytics.js local script. Plugin creates cron task to update cache of Google Analytics scripts daily. Once this feature is enabled, the plugin won’t update the Google Analytics cache file.

Translations

  • English – default, always included
  • Russian

If you want to help with the translation, please contact me through this site or through the contacts inside the plugin.

THANKS TO THE PLUGINS’ AUTHORS

We used some plugins functions:
GA Google Analytics, NK Google Analytics, Complete Analytics Optimization Suite (CAOS), Clearfy — WordPress optimization plugin and disable ultimate tweaker, Enhanced Ecommerce Google Analytics Plugin for WooCommerce

Recommended separate modules

We invite you to check out a few other related free plugins that our team has also produced that you may find especially useful:

Screenshots

  • Control panel

Installation

  1. Upload the ‘simple-google-analytics.zip’ file to the /wp-content/plugins/ directory using wget, curl of ftp.

  2. ‘unzip’ the ‘simple-google-analytics.zip’ which will create the folder to the directory /wp-content/plugins/simple-google-analytics

  3. Activate the plugin through the ‘Plugins’ menu in WordPress

  4. Configure the plugin through ‘Local Google Analytics’ submenu in the the ‘Settings’ section of the WordPress admin menu

  5. Add your google analytics ID there. An example of Google Analytics ID –> UA-0000000-0.

  6. Choose if your blog is on a sub-domain or not. This option is defined in your Google Analytics settings page. Do not change if you don’t know.

  7. Enter the domain where your WordPress is.

  8. Save it & your done.

Reviews

ফেব্রুয়ারী 24, 2020
Thanks, lovely plugin
নভেম্বর 5, 2019
Very nice and useful plugin.
জুন 9, 2018
New update very pleased me, I’ve been using this plugin for a long time, but I had some problems with the new version of PHP. Plugin has changed quite a great, but everyone is afraid of something new, I hope that the plugin will develop further.
জুন 8, 2018
It was a terrific idea to add analytics code and optimize it to improve the score in PageSpeed. Thank you!
Read all 10 reviews

Contributors & Developers

“Local Google Analytics for WordPress – caches external requests” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

3.2.9 (05.12.2024)

  • Added: Compatibility with WordPress 6.7
  • Fixed: Security issue

3.2.8 (21.03.2024)

  • Added: Compatibility with WordPress 6.5
  • Added: Compatibility with php 8.3= 3.2.7 (21.11.2023) =
  • Added: Compatibility with WordPress 6.4
  • Added: Compatibility with php 8.2

3.2.6 (22.03.2023)

  • Fixed: Freemius framework conflict
  • Added: Compatibility with WordPress 6.2

3.2.5 (30.05.2022)

  • Added: Compatibility with WordPress 6.0

3.2.4 (24.03.2022)

  • Added: Compatibility with Disable admin notices plugin

3.2.3 (23.03.2022)

  • Added: Compatibility with WordPress 5.9
  • Fixed: Minor bugs

3.2.2 (20.10.2021)

  • Added: Compatibility with WordPress 5.8
  • Fixed: Minor bugs

3.1.3

  • Added: Subscribe form
  • Fixed: Minor bugs

3.1.2

  • Fixed: A bug with creating a local copy of the Google analytics library.

3.1.1

  • Added: Compatibility with WordPress 4.2 – 5.x
  • Added: Multisite support
  • Fixed: Minor bugs

version 3.0.1

  • Fixed small bugs

version 3.0.0

  • The Simple Google Analytics plugin has some major changes. Unfortunately, the old version of the plugin (2.2.2) is no longer supported, but you still can download it from the WordPress repository in case if the new release doesn’t work for you.
    We’ve updated the code and fixed the compatibility issue for the latest WordPress and PHP versions. We’ve also added additional feature of the Google Analytics cache – this way your website will load faster. The plugin’s name has been changed to Google Analytics cache, but all features remained the same.
    Please, check plugin settings and its performance on your website. We do care about you and want to avoid any problems with the new version.

version 2.2.3

  • Author change

version 2.2.2

  • Add a comment when the code isn’t loaded while being logged

version 2.2.1

  • Corrected the analytics code to prevent non-detection from Google

version 2.2.0

  • Add the demographic / interests reports

version 2.1.0

  • Corrected a bug with wp_enqueue_script
  • Change the JS loading method
  • Add the external links / downloads tracking

version 2.0.5

  • Added the option to not render when logged in

version 2.0.4

  • Corrected a bug where the JS file was loading before jQuery. Thanks to MrZebra for finding that.

version 2.0.3

  • Corrected a bug that made all settings link on extension page going to Simple Google Analytics settings page.

version 2.0.2

  • Google Code has returned to the original. The optimized code have issues with some users having no stats. All should be fine now.

version 2.0

  • Code has been fully rewritten.
  • Google Analytics code has been rewritten to load faster.

version 1.1.6

  • Code is not showing only when logged as Admin.
  • Add option to select where you want to place the code (Header or Footer)

version 1.1.5

  • Add settings in the extensions page (Thanks to Vladimir Pavlikov)
  • Add Russian Translation (Thanks to Vladimir Pavlikov)

version 1.1.4

  • Version 1.1.3 doesn’t shows in the repository…

version 1.1.3

  • Added a translation for ‘Simple Google Analytics Settings’

version 1.1.2

  • French Translation Bug

version 1.1.1

  • Fixed annoying bug

version 1.1.0

  • Added new Site Speed setting from Google

version 1.0.4

  • Corriged a bug if you use the Papercite plugin

version 1.0.3

  • Clean Readme file and clean code

version 1.0.2

  • Added French Translation

version 1.0

  • Add multi-subdomain option