Connecting to Google Analytics

Contents[Hide]

1. Overview

Google Analytics 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.

Note
The Google Analytics data provider for Dundas BI currently supports Universal Analytics properties, not the new Google Analytics 4 option (your site can use both).

Important
The Google Analytics provider used before Dundas BI version 6 has been deprecated and will not work in version 8.0.2 or later. Create a new Google Analytics data connector in version 6 or later to use the up-to-date data 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 into 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

3.2. Enable the Analytics API

Then click the menu button in the top-left corner of the Developers Console, expand APIs & Services and click Library.

Click Library
Click Library

Ensure the correct project is selected at the top-left of the screen. Scroll down and click the Google Analytics API tile.

API Library
API Library

Click Enable to enable the Google Analytics API.

Click Enable
Click Enable

Note
There are multiple APIs available with Google Analytics in the name. The Dundas BI data connector should require only that Google Analytics API is enabled, unless an error message specifies a different one when you try to connect.

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.

From the left navigation, click Credentials. Click Create credentials and select the Service account option.

Add service account credentials
Add service account credentials

Enter a name and a role for the account.

When done, record the service account email address. Copy this from the account details and paste it somewhere to refer to later such as a Notepad app on your computer.

Service account email address
Service account email address

Next, add a new key for the service account. For example, click to edit the service account and click Add Key. Choose a JSON key type.

When finished, a certificate file should be downloaded. This file will be needed later to set up a data connector in Dundas BI.

3.3.1. P12 file type

If you need a P12 key type instead of the default JSON, additional details are needed.

A popup should be displayed that shows the password for the private key. Copy and paste this password with your service account e-mail to refer to later.

3.4. Authorization

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

Go to the Admin area and click User Management.

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

In the Add permissions box, enter or 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. New data connector

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

In the New Data Connector dialog, assign a Name for your connector, and set the Data Provider dropdown to Google Analytics.

Connect to Google Analytics
Connect to Google Analytics

Click Choose File and select the certificate file downloaded earlier, then review the options:

  • If the certificate file is of a P12 file type, you have to provide the Service Account E-Mail Address and Password For The .P12 File that you recorded previously.
  • 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.
  • Choose from the available Sampling Level options.

Click Test connection to check the connection to your account.

Click the submit button at the bottom to save and check in 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.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

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