Skip to main content

Google Analytics

Description:

Google Analytics is a step in the Input Plugin for Process Studio Workflows. The Google Analytics step accesses your Google analytics data to generate reports or to populate your data warehouse. It uses the Google Analytics 3.0 API.

Prerequisites:

  1. You must have a Google Analytics account, and be an owner of the Analytics account that will be used.
  2. The Google Analytics step requires an API key. The method that we support involves generating a private key, creating a service account, and adding the service account's email as a user on your Google Analytics account. Here is how to do this.
  • Go to http://console.developers.google.com and sign in with your credentials.
  • In the Projects page, click Create Project, then when the New Project dialog appears, provide a project name and click Create.
  • In the dashboard select Enable and Manage APIs.
  • Search for Analytics API.
  • Select Analytics API from the search results, then click the Enable API button.
  • In the left menu pane, click Credentials, then click the Add Credentials button, and select Service AcRegex Evaluationcount.
  • When prompted for a key type, select the P12 option, and click Create. Before the P12 file is downloaded you will be prompted to open or save the file. Save the file in a safe location. Saving the file is important because you cannot download it again. You will also need to reference the path to this file when you fill out the Google Analytics step in Spoon.
  • Copy the Service Account's Email Address ( <random characters>@developer.gserviceaccount.com). You will paste it in another field later in these instructions.
  • Go to http://google.com/analytics and sign in with your credentials.
  • Click the Admin menu option, then click User Management.
  • In the Add permissions for field, enter the Service Account's email address you copied previously. Make sure the user has, at minimum, the Read and Analyze permission.

Configurations:

No.Field NameDescription
1Step nameSpecify the name of this step as it appears in the workflow workspace. This name has to be unique in a single workflow.
Google Analytics Connection Settings:
1Application NameSpecify an application name such as "PS" or leave the default.
2OAuth Service EmailYour Google Developer Service Account's Email Address (e.g. "<random characters@developer.gserviceaccount.com>")
3Key fileSpecify the path to the P12 private key associated with your OAuth Service account.
4Specify tableId directlyEnable checkbox if you want to specify the tableId directly without getting the tableId from the profile.
5Get tableId from profileSelect a Google Analytics tableId from your profile.
Query Definition:
1Start DateSpecify the start date associated with the query. The date must be entered in the following format: YYYY-MM-DD.
2End DateSpecify the end date associated with the query. The date must be entered in the following format: YYYY-MM-DD.
3DimensionsSpecify the dimension fields for which you want to query. The Google Analytics API documentation provides you with a list of valid inputs and metrics that can be combined.
4MetricsSpecify the metrics fields you want returned. At least one metric must be provided.
5FiltersSpecify the filter (described in the Google Analytics API documentation). Here is an example: 'ga:country==Algeria'.
6SortSpecify a field on which to sort. Here is an example: 'ga:city'.
7Specify a segment for the queryEnable checkbox to specify a segment for the query. A segment is analogous to a database "view."
8Use custom segmentEnable checkbox, if you want to specify a custom segment. A segment is analogous to a database "view."
9Use predefined segmentSelect from the predefined segments dropdown list. A segment is analogous to a database "view."
Output fields:This is a tabular list of output fields. It is populated by the get Fields button.
1Feed field typeChoose from a dropdown list.
2Feed fieldSpecify a Feed field name.
3Output fieldSpecify an output fieldname to store the feed field.
4Output typeChoose the output data type.
5Input formatChoose a format for the Output type.
Limit Size:Provide a numeric limit to the number of output fields.