ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Connector Google Analytics

Google-Analytics-connector-form.png

Google Analytics connector allows you to integrate your Google Analytics account with Meiro Integrations and use it as a data source. 

 

Requirements

To set up a Google Analytics connector, you need a Google Analytics account, which can be created here.

Useful links:

Query Explorer 

Reference of Google Analytics Metrics and Dimensions

 

Data In/Data Out

Data In

N/A

Data Out

All the data is saved in CSV format in the /data/out/tables/ folder.

You can learn more about folder structure in configuration here.

 

Authorization

After creating the Google Analytics connector, you will first need to authorize it to access your Google Analytics account. 

Click on the Authorize button and allow Meiro.io to access chosen Google account. You can reset your authorization at any time or if you want to authorize another Google account instead.

Google-Analytics-connector-Authorize.png

 

Parameters

Google-Analytics-parameters.png

 

Profile

Google-Analytics-Profile.png

To connect Google Analytics profile you need to know its ID, Web Property ID and Account ID. 

Google Analytics connector supports connecting to more than one Google Analytics profile (Add Profile button). 

To find required properties go to the Admin section of your Google Analytics account:

  • ID (required) in  Google Analytics called View ID: View (choose view) -> View Settings -> View ID
  • Web Property Id (required) in Google Analytics called Tracking ID: Property (choose Web Property) -> Property Settings -> Tracking ID
  • Account Id (required) in Google Analytics called Account ID:  Account (choose account) -> Account Settings -> Account ID

 

Query

Google-Analytics-Query.png

Google Analytics connector supports calling several queries in one configuration. If you are connecting to more than one profile, each query will be called for each profile.

 
EnableEnabled (True/False)

Enable or disable a query.

 

Name (required)

Insert the name of the query.

 

Output Table (required)

Insert the name of the output table chosen by the user.

 
Anti-sampling

Under certain circumstances, Google Analytics may return the sampled data instead of precise data. It is covered in this article. To avoid this you can turn on dailyWalk or adaptive algorithms. 

Solutions available:

  •  DailyWalk

The date range is divided into a number of days (one request per day). It takes more time as it requires multiple API calls, but returns more precise data.

  • Adaptive 

The date range is divided into smaller chunks that work faster but data may not be that precise.

  • None 

Algorithms are not used and API returns only the sampled data.

 
Metric and Dimension

Input the metrics (ga:metric) and dimensions (ga:dimension) desired for your chosen query. The full reference of the available metrics and dimensions in Google Analytics can be found here.

Google Analytics API supports not only built-in metrics but also metric expressions using arithmetic operators. For example, use ga:timeOnPage/ga:pageviews for calculating the average time on the page per one view in the metric expression field.

 

Filter Expressions

This feature allows to filter data, using available operators (listed here); all operators should be used in the not encoded form. Common uses for filters are covered in this article here.

Example:ga:sourceMedium=@google dimension filter will include only google source in the downloaded data.

 
Data Range

Google-Analytics-Data-Range.png

Date values can be set up for a specific date by using the format YYYY-MM-DD or today, yesterday, NdaysAgo

Values must match [0-9]{4}-[0-9]{2}-[0-9]{2}|today|yesterday|[0-9]+(daysAgo) regular expression.

Also, it supports expressions compatible with php strtotime() function, and it is possible to use not only fixed data ranges but relative ones too (-1 week, now, -5 days, etc.). 

More detailed this question is covered in the Google Analytics official documentation.

Accessing data from multiple data ranges is supported for each query. Each data range specifies a time window for extracting the data.