Connecting to Google Analytics

Contents[Hide]

1. Overview

Google Analytics (GA) is a service offered by Google that compiles statistics regarding visitors to a website.

This article shows you how to set up a data connector to extract data from your Google Analytics account.

Important
In version 6 and above, the original Google Analytics provider from previous versions has been deprecated. The original provider will continue to work, and can be found at the bottom of the Data Provider drop down. When creating new ones, it is best to use the new and improved provider.

2. Google Analytics account

You must have a Google Analytics account in order to create this data connector in Dundas BI. 

To sign up, go to: http://www.google.com/analytics/

Google Analytics account
Google Analytics account

3. Setup

3.1. Developers console project

You need to create or use an existing project in the Google Developers Console as a first step.

Go to https://console.developers.google.com/project and sign in to your Google/Gmail account.

Once signed in, you'll see a list of existing projects (if there are any) or you can click Create project to create a new one.

Create a new project
Create a new project

In the New Project dialog, enter a name for your project and then click Create.

Enter the project name
Enter the project name

3.2. Enable the analytics API

Make sure you are logged into the Developers Console and your project is selected as the current project.

Then click the menu button in the top-left corner.

Click the menu button
Click the menu button

In the left menu, click API Manager.

Click the API Manager
Click the API Manager

Click the Google APIs tab to see the available APIs.

Click the Analytics API link.

API Library
API Library

Click Enable to enable the Analytics API.

Click Enable
Click Enable

Note
In order to use the new Reporting API, you will need to enable it on the Google Cloud Platform. For more information, see Overview - Analytics Reporting API v4

3.3. Service account credentials

This section shows you how to generate Service account credentials which will allow Dundas BI to access your Google Analytics data.

In the API Manager, click Credentials in the left navigation. On the right, click Create credentials and select the Service account key option.

Add Service account credentials
Add Service account credentials

Set the Service account dropdown to New service account. Then enter the Name for your service account.

Click Create to generate a certificate file. This file will be needed later to set up a data connector in Dundas BI.

Create a key
Create a key

The Service account created dialog is displayed and shows the password for the private key. Copy and paste this password into Notepad for later use.

Close the dialog to see the list of service account keys which includes the one you just created. 

Click Manage service accounts in the top-right corner.

Click Manage service accounts
Click Manage service accounts

Copy and paste the Service account email address into Notepad for later use. You'll need to enter this email address when setting up the data connector in Dundas BI.

Service account email address
Service account email address

3.3.1. P12 file type

If you require the P12 file type instead of the default JSON, you will require some additional information.

3.4. Authorization

Now that the client credentials have been generated, sign in to your Google Analytics account in order to give authorization to these credentials.

Go to the Admin area and click User Management on the left.

Sign in to Google Analytics and go to User Management screen
Sign in to Google Analytics and go to User Management screen

In the Add permissions for box, paste the Service account email address that you recorded earlier. Then click Add.

Add permissions for the email address
Add permissions for the email address

4. Dundas BI data connector

From the main menu, click New, and then select Data Connector.

In the New Data Connector dialog, click inside the Name box. Enter a name for your data connector.

Click the Data Provider dropdown and choose Google Analytics.

Connect to Google Analytics
Connect to Google Analytics

Click Choose File and select the certificate file.

If the certificate file is of a P12 file type, you have to provide the client credential information that you generated previously:

  1. Paste the Service Account E-Mail Address that you recorded previously.
  2. Enter the private key password for the certificate file.

When the Use Reporting API checkbox is selected, the core v4 version of the API will be used. If unchecked, the core v3 version will be used.

Define the Sampling Level:

  • DEFAULT - balances speed and accuracy
  • SMALL - smaller sample size, fast
  • LARGE - more accurate, slower

Click Test Connection to check the connection to your GA account.

If the test is OK, click the submit button at the bottom to create the data connector and perform data discovery.

5. Displaying Google Analytics data

To see the Google Analytics data, create a new metric set or dashboard.

Go to the Explore window, expand your data connector and its cube, then drag its measures and dimensions to the canvas.

Viewing your Google Analytics data
Viewing your Google Analytics data

6. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri