Google Analytics provider

With the Google Analytics provider you can integrate with the Google Analytics Reporting API or the Google Analytics Real Time API.

To enable the google analytics provider in your Business Analyze instance you need to setup access for the application.

Required items:

  • API-integration file in .JSON format
  • DataView ID

 

I) Setup required credentials in Google Developer Console.

  1. Login to Google Developer console with your Google account
     
  2. Create a new project. For example: "BA integration" It will take couple of seconds. The notification icon at top will tell you when it is ready.

  3. Go to your project dashboard and then select “Go to APIs overview”


     

  4. Click “ENABLE APIS AND SERVICES”. It will take you to API library page.


     

  5. Search for “analytics” and choose “Google Analytics Reporting API” from results.


     

  6. Click “Enable” on API page.

     

  7. It will prompt you to setup credentials in order to use this API.

     

  8. Select required options to create appropriate credentials. As we are going to access information from a console application and later it has to be scheduled as a job, we have selected the option “Other non-UI…”

     

  9. Create service account. “Service account has capability to interact with Google services without requiring user consent”.
    Note down the Service Account Id, we would need to authorize this user in our Google Analytics panel.

     

  10. Clicking on “Continue” will download the key file in JSON format and show the confirmation prompt

    .

     

  11. Authorize this newly created service account in Google Analytics.

    Go to Admin section of your application in Google Analytics. Select the appropriate view and “User Management” option.

    Add service account ID email

    Add appropriate permission. Here I just want to give access of reading and analyzing reports.

    Click “Add” and you are done.

 

II) Next step is to setup the integration in Business Analyze.

  1.  Go to System Administration => Data Central.
     
  2. Add the newly downloaded JSON file to the folder here:

    If the folder does not exists. Create "GoogleAnalytics" folder right below the CustomerFolder like this:


     

  3. Add a "New data source" and select the "Google Analytics" provider.

    The dataview ID should be available from the project portal in Google Developer Console.

 

Then you are ready to start querying the Google Analytics data.

 

For more information about available fields see:

Reporting API

Real Time API

 

Example of Google Reporting API Query:

  1. Add a new data table in Data Central.
     
  2. Select Query type: "Procedure"
     
  3. Select "GoogleAnalytics" for reporting API.

The you neeed to set the metrics and dimensions you want to use. See the URL above for "Reporting API" for the available fields.

Ensure you use , (comma) between each fields.

 

Example of Google Real Time API Query:

  1. Add a new data table in Data Central.
     
  2. Select Query type: "Procedure"
     
  3. Select "GoogleAnalyticsRealTime" for reporting API.

For real time we only have metrics since the date is no option here, it is real time. Shows what's going on at the moment.

Example above show how many active users we have a our web site at the moment.

See the URL above for "Real Time API" for the available fields.