How to collect data from Google Analytics

This article will show you how to create a Metric using a Google Analytics report as a data source. It assumes that you have already established connectivity to your Google Analytics server. The process for creating a Dataset is similar.

The example shown below is for the Metric.

1. Access New > Metric

Provide the basic information required for creating a new Metric:

  1. Specify this Metric's Measure.  If you do not see the measure that you want to use, scroll down to the bottom of the drop-down list and create  a new one by clicking Add New Measure
  2. Select the Measurement Interval that applies to your element
  3. Give the Metric a unique Name
  4. Assign a Category
  5. Click Next: define details to proceed with data collection

2. Provide Data Collection Settings

On the Data tab in the Metric Editor:

  1. Select the Google Analytics plug-in serving as a Data Source for this Metric
  2. Set the Data Collection Trigger that will initiate data collection for the Metric
  3. Specify the View that allows access to Reports in a Google Analytics account
  4. Input the Plugin Command listing all the data you would like to fetch from Google Analytics (manually or using the Visual Editor)
  5. Validate your Plug-in Command
    • If your statement is valid, the statement box will be green; if there are any errors, the box will be colored in red and errors will be explained in the field below.
  6. Collect Data 
  7. Enable and Publish your Metric

2.1. Example using the Visual Editor

The Google Analytics Query Builder allows constructing commands without the need to learn the plugin syntax and avoiding typos/mistakes:

  1. Click [Visual Editor] to select this option
  2. On the pop-up, add the fields by using the corresponding buttons: [+Dimension], [+Metric], [+Derived field], [+Count].
  3. Specify the Start Date and End Date for data collection and Limit the number of rows that will be displayed on Save
  4. Determine which Segments of data you want to fetch from Google Analytics

Save your settings. Plugin command validation will start automatically.

3. Metric will be displayed in Viewer