#6

Product support

Visit this product's website for support.

Categories

  • Marketing
  • Miscellaneous
  • Utility

This plugin adds Google Analytics tracking and reporting features to the OctoberCMS.

Configuration

Configure the API

To get started using Google Analytics API, you need to first create or select a project in the Google Developers Console and enable the API. Using this link guides you through the process and activates the Google Analytics API automatically.

Alternatively, you can activate the Google Analytics API yourself in the Developers Console by doing the following:

  1. Open the Credentials page.

  2. Select the Overview menu item and enable the Analytics API.

In either case, you should end up on the Credentials page and can create your project's credentials from here.

Create a client ID

  1. Open the Service accounts section of the Developers Console's Permissions page.

  2. Click Create service account.

  3. In the Create service account window, type a name for the service account, eg: OctoberCMS Analytics.

  4. Place a tick in the box Furnish a new private key and select JSON for the Key type.

  5. Then, click Create.

  6. A .json file will be generated, this is the private key for your account. Accept the download and save it to your computer.

  7. Click Close.

  8. You should see an email ending with iam.gserviceaccount.com, if not select the Permissions tab. Copy this address to your clipboard.

Configure Google Analytics

  1. In a new tab, navigate to the main Google Analytics site and select the property you want to track.

  2. Click the Admin main menu tab at the top. Select the Property > User Management menu item.

  3. Paste the email address from the clipboard in to the field Add permissions for and make sure the permission is set to Read & Analyse. Click Add.

  4. Click the Admin main menu tab again and select View > View Settings from the menu. Copy to your clipboard the Profile ID (should be a number).

Configure October back-end area

  1. Open your October back-end administration area and open Settings > Google Analytics.

  2. Paste the Account ID from the clipboard in to the field Analytics View/Profile ID number.

  3. Upload the previously downloaded .json private key file to the Private key field.

  4. Specify the Tracking ID (eg UA-12312312-3) and Domain name values if you are going to use the plugin's built-in tracking component. To find this code, select Admin > Property > Property Settings from the Google Analytics menu.

  5. If Tracking is not working initially, enter the value auto for the Domain name field. This is a fix for newborn Google Analytics accounts.
Traffic overview report

Adding the tracking code

Using the tracking code provided by the plugin is optional - the reporting part does not depend on whether you track your traffic with the built-in tracker or with a custom code generated by Google Analytics tools.

To add the plugin's tracking code to your website just drop the Google Analytics Tracker component to your CMS layout and add this code to the layout code after the page tag:

{% page %}
{% component 'googleTracker' %}

Troubleshooting

Fix for Windows / XAMPP

cURL error 60: SSL certificate problem: unable to get local issuer certificate

  1. Follow this link: http://curl.haxx.se/ca/cacert.pem and save it in a file called cacert.pem.

  2. Open your php.ini file insert or edit the following line:

    curl.cainfo = "[pathtothisfile]\cacert.pem"
  3. Restart Apache
  • Found the plugin useful on 15 Feb, 2017

    Very nice plugin. Setup instructions clear, but maybe for an older google console UI, had to faff around a bit to find the sections needed. But does the job

  • Found the plugin useful on 17 Dec, 2016

    It just works! The documentation actually lists all the steps. Fantastic

    Turning on API access is a bit tricky for a first timer but that's all on Googles end.

    One thing to remember with this plugin is that there is no actual analytics page with charts. It's even better than that as you just add the widgets to your Oct Dashboard. Simple step but it had me puzzled for a while.

  • Found the plugin useful on 14 Dec, 2016

    Wonderful, followed the instructions and got it set up without any issues.

    Thanks.

  • Found the plugin useful on 12 Nov, 2016

    Very awesome. tough to setup but from a developer standpoint it's pretty easy

  • Found the plugin not useful on 15 Sep, 2016

    Doesn't work when bluehex/youtube plugin is enabled. Problem caused by loading the wrong Google_Client class

  • Found the plugin useful on 4 Aug, 2016

    Great plugin and easy to set up.

  • Found the plugin useful on 5 Jul, 2016

    Simple and clever implementation and use. I haven't had the chance to extend it yet.

  • Found the plugin useful on 24 Jun, 2016

    Very helpful. Easy to use. If you are crashing on error while uploading .json key try to disable adblock.

  • Found the plugin useful on 31 May, 2016

    Good Plugin and all the instructions are correct as of May 2016 with the new Google API console. Many thanks.

  • Found the plugin useful on 2 Apr, 2016

    If you follow the instructions just right, It Works Great! ...instructions could give better explanations to navigate google analytics settings.

  • Found the plugin useful on 26 Jan, 2016

    Thanks for the update! Works fine now. Also better documentation! Great work. Thanks

  • Found the plugin useful on 22 Oct, 2015

    Thanks, @Gavin Foster! Until I read your notes I was only getting 403. Useful plugin

  • Found the plugin useful on 16 Oct, 2015

    Instruction says: Click the Admin main menu tab at the top. Select the Property > User Management menu item. Paste the email address from the clipboard in to the field Add permissions for and make sure the permission is set to Read & Analyse. Click Add.

    But this not found anywhere in Google Analytics console.. Please help!

  • Found the plugin useful on 15 Oct, 2015

    So glad I finally got this working! Great work! The only "gotch-ya" was the instructions say that the "Analytics View/Profile ID number" is found in GA under "Account / Account Settings"... I got errors when using that id number so used the one found under "View / View Settings" (different ID number) and it worked perfectly... Happy days!

  • Found the plugin useful on 7 Jun, 2015

    Must have, works great. Would love to have a dashboard of Analytics automatically set up for new user accounts though.

  • Found the plugin useful on 1 Jun, 2015

    An amazing plugin. I am using this for all of my projects because of the dashboard widgets. Thanks!

  • Found the plugin useful on 7 May, 2015

    Excellent plugin, this is a nice compliment to the backend dashboard!

  • Found the plugin useful on 25 Apr, 2015

    Thank you for your plugin, it took me a long time before setting it up.

  • Found the plugin useful on 20 Feb, 2015

    Thanks. It works.

  • Found the plugin useful on 17 Jan, 2015

    Omg! Thanks a lot, i really use Account ID!

  • Found the plugin useful on 1 Oct, 2014

    The explanation reeeally should be improved upon. Maybe sceenshots?

  • Found the plugin useful on 24 Jul, 2014

    got it! You dont have to upload the json to your OctoberCMS.

    After creating a new client id in googles dev console you habe to generate a new P12 key and upload this one to your October instance.

  • Found the plugin useful on 11 Jun, 2014

    Great plugin!

  • Found the plugin useful on 5 Jun, 2014

    it works perfectly. thanks.

  • Found the plugin useful on 26 May, 2014

    I think the plugin needs cache and cronned job, sometimes the dashboard take long time to load.

  • Found the plugin useful on 25 May, 2014

    Works like a charm but instructions should be more detailed.

  • Found the plugin useful on 23 May, 2014

    works like a charm !

  • Found the plugin useful on 21 May, 2014

    Works great, make sure you check file permissions!

  • Found the plugin useful on 20 May, 2014

    all work

1.2.1

Update the plugin compatibility with RC8 Google API client

Jun 07, 2016

1.2.0

Update Guzzle library to version 6.0

Apr 19, 2016

1.1.0

!!! Updated to the latest Google API library

Jan 26, 2016

1.0.7

Removes Client ID from settings because the workflow no longer needs it

Jan 14, 2016

1.0.6

Fixes dashboard widget using latest Google Analytics library

Jan 11, 2016

1.0.5

Minor fix to support the updated Google Analytics library

Jul 14, 2015

1.0.4

Fixes a bug where the certificate upload fails

Jun 19, 2015

1.0.3

Minor improvements to the code

Feb 13, 2015

1.0.2

Fixed a minor bug in the Top Pages widget

Jun 25, 2014

1.0.1

Initialize plugin

May 12, 2014

Upgrade guide

Upgrading To 1.1

The settings and instructions for authorizing Google have been drastically simplified. For existing accounts, you will need to generate a new key file using these steps:

  1. Log in to the Google Developers Console and select the Permissions > Service accounts section.
  2. Click the menu dropdown icon next to the Service account
  3. Select Create key
  4. Choose the Key type of JSON.
  5. Download the file to your computer and upload it to the October back-end settings form.

The Profile ID number has also changed, follow these settings to find the new one:

  1. In a new tab, navigate to the main Google Analytics site and select the property you want to track.
  2. Click the Admin main menu tab again and select View > View Settings from the menu. Copy to your clipboard the Profile ID (should be a number).
  3. Paste this number in the Analytics View/Profile ID number field in the October back-end settings form.