Tag Archives: optimization

cache google analytics banner

How To Cache Google Analytics Code

If you’re trying to increase site speed by caching Google Analytics code then you’re in luck. I’ve created this guide with easy instructions on how to cache your Google Analytics code.

In this guide we’ll be covering the following:

  1. Creating a php script that grabs the Analytics JavaScript from Google server.
  2. Creating a cron job to grab the latest version of the script.
  3. Caching Analytics locally. Continue reading