Google Analytics for Contentbox CMS

Akitogo Team, 18 May 2017

We recently wrote a small module for Contentbox CMS which makes it easier to setup Universal Google Analytics and enable a few options. While it's pretty easy to insert a Google Analytics tracking snippet in Global Html section of Contentbox (see image below) this approach has a few downsides

E.g. if you are writing an article and preview it a few times then all previews are tracked as a page views (if you don't exclude your office IP address in Google Analytics).

The module

Our module disables tracking for all previews as well for all logged in admin users. It offers your admins and editors an easy option to switch on and off Google Analytics itself also Plugins, like: 

  • Anonymize Ip Address
  • Display Features
  • Enhanced Link Attribution
  • Ecommerce tracking.

Please note that some of these Plugins require you to send more information to GA, this module just loads the required library in the head section of your html as a base for further actions. Please refer to developer documentation.

Further features: track scroll depth

We implemented as well a very useful GA Plugin for tracking the scroll depth. If your site has long pages and you want to know how far the users scrolled down then you need a solution to track the user behaviour. Please check this blog post from which explains it all in detail.

If you are wondering where to find the page scroll events navigate to Behavior>Events>Overview then choose Event Label. Have a look at the screenshot below

How to install

The easiest way to install this module is to use Commandbox, just type:

box install cbGoogleAnalytics

You can download it as well from our Github page


If you find any bugs or have any comments please let us know