Skip to main content

Google data sources

Google Analytics

Overview

The Google Analytics web tool produces a variety of analytics on website traffic. The insights into preferences, behavior and interactions with websites or apps can be modelled in Data Hub and detailed reporting can be built on top of this data to allow for further inspection and understanding.

Prerequisites

  • Google Account

  • Google Analytics Account

  • Service Account and key file. Service Account Configuration

  • Analytics permission: From your Google Analytics account, perform the following steps:

    • Click the Admin (cog icon) option.

    • Type the service account's email address in the Add permissionsfor text box.

    • Verify that Read & Analyze is selected from the corresponding drop-down list.

    • Click Add.

Connect to the Google Analytics data source

To connect to the data source, you must first authenticate your google service account.

  1. Specify the following information for your Service Account. Follow steps in Service Account Configuration if you do not have this setup.

    • Service Account Email. Specify the Google API service account email address to be used for accessing Google Analytics. The account needs to be granted read access to each Google Analytics profile/view to which you want to connect.

    • Private Key File. Upload the service account private key file (in P12 format).

    • Private Key Password. Specify the password for the service account private key file.

  2. Click Test Connection.

  3. If the connection is successful, the following settings become available and can be configured:

    1. Account - Select the Google Analytics account from which data will be read.

    2. Web Property - Specify the web property from which data will be read.

    3. Profile/View - Specify the profile/view from which data will be read.

Google Sheets

Overview

Google Sheets is a cloud-based equivalent of a spreadsheet program like Microsoft Excel. This connector allows you to connect to any google sheets you have access to and pull its data into Data Hub.

Prerequisites

For Service Account Authentication, you need to Service Account Configuration before you can connect.

Connect to the Google Sheets data source

  1. Choose one of the following authentication types to continue:

    OAuth authentication
    • Provide your OAuth username and password.

    Service Account authentication

    Specify the following information for your Service Account. Follow steps in Service Account Configuration if you do not have this setup.

    • Service Account Email. Specify the Google API service account email address to be used for accessing Google Sheets.

    • Private Key File. Upload the service account private key file (in P12 format).

    • Private Key Password. Specify the password for the service account private key file. (This password is provided when you set up the account) as described in the configuration above.

  2. Click Test Connection.

    GoogleSheetsServiceAccountConnection.jpg

Service Account configuration

  • Step 1 - Google account creation: Use an existing google account with unique email or create a new google account specifying a unique email address and password.

  • Step 2 - Google service account creation:

    1. Go to https://console.developers.google.com/apis

    2. Login with your google account credentials

  • Step 3 - Add a project

    1. If you don't have an existing project, create a new one by clicking on NEW PROJECT

      SaveNewProject.jpg
    2. Enter your project name.

    3. Click CREATE

  • Step 4 - Add Google API's

    1. Click on ENABLE APIS AND SERVICES

      Enable_API.jpg
    2. Search for your desired API, in this case we will add the Google Sheets API, and there after Google Drive API. For Google Analytics enable the Google Analytics API

    3. Select the API

    4. Click ENABLE

  • Step 5 - Add Credentials and save private key

    1. Add the service account as credentials.

      AddCredentials.jpg
    2. Click on CREATE CREDENTIALS

    3. Select Service Account

    4. Add the service account name, ID and description and click Done

      CreateServiceAccountCredentials.jpg
    5. Go into the newly added service account credential and click on KEYS.

      AddKey.jpg
    6. Click on ADD KEY, create new key

    7. Choose P12 and click CREATE

    8. Copy the Service account email id (e.g. johnzap@numeric-duality-397502.iam.gserviceaccount.com) and Password. Also, store the P12 key on your desktop. This key file will be required for connecting to the data source in ZAP.

      PrivateKeySaved.jpg