A NEW ERA OF INTELLIGENT QUANTITATIVE ECOMMERCE - THAT WORKS FOR YOU ECOMMERCE - THAT WORKS FOR YOU
Knowledge Base
+
Admin Messages (1)
+
Common Tasks (1)
+
Insights (1)
+
Interventions (1)
+
Languages (1)
+
Questions & Answers (1)
+
Reviews (1)
+
Site Scripts (1)
+
Web Services (1)

Enabling Google Analytics API with IRP

Google have created an extremely comprehensive API linking to Analytics which allows us to harness the powerful reporting capabilities of Google for tracking visitor numbers, conversion rates and other transactional data.

We have integrated Google’s Analytics API with the IRP for use within the IRP’s own Statistics section and also in IRP World. Statistics are sought from both the IRP and from Google Analytics and this data is combined to provide a comprehensive analysis of a client’s month-by-month progress.

Google have written their own documentation on how to access the Analytics API:

https://developers.google.com/analytics/solutions/articles/hello-analytics-api

There are 3 steps involved in enabling access to the Google Analytics API from a client’s IRP:

  1. Log in to Google
  2. Register project in Google Developers console
  3. Configure IRP Statistic Settings

Step 1. Log In to Google

Please ensure that when logging into Google, the account being used has full access rights to Google Analytics. If the account does not have the sufficient permissions to access Analytics, please ask someone with greater access rights to grant permission to the Google account.

Sign in to Google Developers Console window

Once logged in to an appropriate Google account, verify that the account has access to Google Analytics. Once verified, move to Step 2.

Step 2. Register Project in Google Developers Console

To access the Google Analytics API from a client IRP, a project must be created in the client’s Google Developers Console. This process can be broken down into the following steps:

  1. Create API project
  2. Enable Google Analytics API on new project
  3. Set Up Credentials and Create a Key File
  4. Add Permissions for the Project in Google Analytics
  1. Create API Project
    1. Go to the Google Developers Console and create a project to talk to the IRP:
      https://console.developers.google.com/project?authuser=0
    2. Click Create Project:
    3. Google Developers Console Create New Project window

    4. Enter the Project Name API Project.
    5. Leave the Project ID as the automatically generated value.
    6. Tick the check box agreeing to the Terms of Service.
    7. Click Create.
    8. Google will redirect to the newly created project dashboard:
      Google Developers Console Project Dashboard

  2. Enable Google Analytics API on New Project
    1. Click Enable and manage APIs.
    2. Scroll down to the Advertising APIs section, click Analytics API and select Enable API.
  3. Set Up Credentials and Create a Key File
    1. Select Credentials from the left navigation menu in the Project Dashboard.
    2. Using the New Credentials drop-down menu, select Service Account Key.
    3. New Credentials menu
    4. Select a name for the account and select the P12 option for the key type:
    5. New Service Key Account
    6. Click Create.
      The key file is now downloaded to your Downloads folder by default, from where you can upload it to the IRP via the OAuth P12 Key setting on the IRPStatisticsSettings.aspx screen (see Step 3 in the following section).
  4. Add Permissions for the Project in Google Analytics
    1. Click Manage service accounts on the right side of the main Credentials screen.
    2. Copy the Email address.
    3. Service account email address
      You use this email address to populate the OAuth Email Address setting on the IRPStatisticsSettings.aspx screen (see Step 3 in the following section).
    4. Open Google Analytics and navigate to Admin > User Management > Add Permissions for.
    5. Add permissions box
    6. Allow ALL permissions using the drop-down menu.
    7. Click Add.

Step 3. Configure IRP Statistic Settings

There are several IRP Statistic Settings associated with the Google Analytics API that you need to configure. To access these, click the cog wheel icon in the top-right corner of the IRPStatistics.aspx screen (you can find this page by going to Statistics > Monthly Statistics or by clicking the 'Enter Costs' button in the bottom nav). You will then be on the IRPStatisticsSettings.aspx page where you can enter values for the following settings in the Google Analytics Settings section:

  • Profile ID
    Too find this:
    1. Log in to the Google Analytics Dashboard and click Admin on the top navigation bar.
    2. Click View Settings in the View column.
    3. The View ID (Profile ID) is located under the heading View ID under View Settings.
  • OAuth Email Address
    You can find this in the Permissions section of the Google Developers Console, on the Service Accounts tab. This is the oAuth Email Address connected to the Service account set up against your API Developer's Project in Google Analytics.
  • OAuth P12 Key
    You can get this file in the Credentials section of the Google Developers Console, on the Service Accounts tab. Use this to upload the oAuth .p12 authentication key for your developer's app's Service account.

You can automate statistics by clicking the Auotmation tab and selecting to repeat on a Daily, Hourly, Weekly or other basis (Daily is generally sufficient). You can also select the time when the automation should first be run.

When you have entered these details, click the Update IRP Statistics button.

NOTE: For other important IRP World settings, see the following help topics: Monthly Statistics (for Statistics Settings) and Common Tasks (for the 'Auto Update IRP Statistics' Common Task).




Copyright © 2018 IRP Commerce. Use of this website constitutes acceptance of the IRP World Terms of Use, IRP Privacy Policy and IRP Cookie Policy
IRP Commerce is a Trading Name of Export Technologies Limited, a Deloitte Fast 50 Company six times: 2010, 2011, 2012, 2013, 2014 & 2018   Deloitte.