Skip to main content

[Deprecated] Import Data from Google Analytics

Deprecation Notice

Please note that support for new version of importing data from Google Analytics has ended since December 2021. Check out the announcement and suggested solutions here.

This also means that:

  • New customers will not be able to see/select Google Analytics as an Import option in Import Model.
  • Existing customers who are using the (legacy) Google Analystics will still be able to see/select Google Analytics connection, which is accompanied by a deprecation notice for unsuspecting customers.

The Google Analytics Data Model lets you load your GA data into your relational databases via the Google Analytics Reporting API.

Model your Google Analytics data

Requirement

Please note that you need a SQL database to load your Google Analytics data into. If you don't have any, please check out our guide here.

At this step, you must already have a modeling-support source. Select the source that you want to load your Google Analytics into.

##2. Create Data Model from Other Sources Click on Create, choose Other Sources and select Google Analytics.

##3. Connect to Google Analytics If you have previously connected to your Google Analytics account, you can select a property from the dropdown. If not, select + Connect new data source.

Holistics will first request your permission to connect to your Google Analytics account. The credentials will be saved for further use.

##4. Load your Data

First, select a Property and an Analytics View.

Next, select Metrics (required), Dimensions, and Date Range to build a Google Analytics query. For an in-depth guide about Google Analytics dimensions and metrics, please refer to this guide by Google.

Analytics API limits

Google Analytics only allows a maximum number of 7 Dimensions and 10 Metrics.

After that, customize your query with Filter. Some basic syntax:

Metric Filters

OperatorDescriptionExamples

==

Equals

ga:timeOnPage==10

!=

Does not equal

ga:timeOnPage!=10

Greater than

ga:timeOnPage>10

<

Less than

ga:timeOnPage<10

>=

Greater than or equal to

ga:timeOnPage>=10

<=

Less than or equal to

ga:timeOnPage<=10

Dimension Filters

==

Exact match

ga:country==Singapore

!=

Does not match

ga:country!=Singapore

=@

Contains substring

ga:country=@si

!@

Does not contain substring

ga:country!@si

=~

Contains a match for the regular expression

ga:country=~^s.*

!~

Does not match regular expression

ga:country!~^s.*

Combining filters

  • OR: using a comma (,) to define OR operator. Example:
ga:country==Hong Kong,ga:country=Canada
  • AND: using a semi-colon (;) to define AND operator. Example:
ga:browser==Firefox;ga:operatingSystem==Windows,ga:operatingSystem==Macintosh

For more details, please refer to Google Analytics's Filter Syntax docs.

After that, click Validate query to Preview your data, then Execute.

##5. Advanced Settings From Advanced Settings you can modify the destination table from Destination Settings, and control how column types will be cast from Sync Configuration. Please visit the dedicated page for more details.

Other Notes

Relative Date

Holistics allows relative date range when loading data from Google Analytics.

Data Sampling

Basing on the combination of your dimensions and metrics, a Google Analytics query may return aggregations based on sampled data instead of your full data. For more details, please refer to this documentation by Google. When sampling is applied, Holistics will try to import the most accurate data provided.


Let us know what you think about this document :)