This article will help you learn about how Daasity replicates data from Google Analytics (Universal. limitations to the data we can extract and where the data is stored in the Google Analytics schema.
Last updated
Was this helpful?
Integration Overview
Google Analytics is Google's free web analytics service that allows you to analyze in-depth detail about the visitors on your website. It provides valuable insights that can help you to shape the success of your business.
The Daasity V2 Base Google Analytics extractor pulls a standard set of data via the Core Reporting API. The Core Reporting API is a report generation API and requires parameters to be passed into the API. The request generates a report that is a summary roll-up of session level data that is stored within GA and returned as an aggregate summary.
NOTE: The API has limitations on the level of granularity that can be returned:
Dimensions are limited to 7 per report
Metrics are limited to 10 per report
Daasity queries each report for each day which thus removes the need to include the ga:Date as a parameter and thus allowing the full 7 dimensions to be used.
Integration Availability
This integration is available for:
Growth
Enterprise
API Endpoints
The Google Analytics extractor is built based on this . The following endpoint is used by Daasity to replicate data from Google Analytics:
Entity Relationship Diagram (ERD)
Google Analytics Schema
The Daasity V2 Google Analytics extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.
NOTE: There are three extractions being made for this report, due to dimension limits within an extraction. The primary table (ga.base_transactions) will contain the full set of columns while their stage tables (ga.base_transactions_stg2 and ga.base_transactions_stg3) will have a subset of metrics. Stage tables are stitched together to complete the primary table, updating rows with matching sync keys.
Base Transactions Stage 2
Update Method: UPSERT
Table Name: ga.base_transactions_stg2
JSON Element
Database Column
MD5(view_id + ga:transactionid)
id
ga:transactionId
transaction_id
View ID selected for the integration
view_id
ga:Date
created_on
ga:countryIsoCode
country_iso_code
ga:country
country
ga:region
region
ga:latitude
latitude
ga:longitude
longitude
ga:metro
metro
ga:transactionRevenue
transaction_revenue
MD5(view_id + ga:transactionid)
__sync_key
account_id
_account_id
Daasity: timestamp when loaded into DB
__synced_at
NOTE: There are three extractions being made for this report, due to dimension limits within an extraction. The primary table (ga.base_transactions) will contain the full set of columns while their stage tables (ga.base_transactions_stg2 and ga.base_transactions_stg3) will have a subset of metrics. Stage tables are stitched together to complete the primary table, updating rows with matching sync keys.
Base Transactions Stage 3
Update Method: UPSERT
Table Name: ga.base_transactions_stg3
JSON Element
Database Column
MD5(view_id + ga:transactionid)
id
ga:transactionId
transaction_id
View ID selected for the integration
view_id
ga:Date
created_on
ga:deviceCategory
device_category
ga:referralPath
referral_path
ga:fullReferrer
full_referrer
ga:browser
browser
ga:operatingSystem
operating_system
ga:transactionRevenue
transaction_revenue
MD5(view_id + ga:transactionid)
__sync_key
account_id
_account_id
Daasity: timestamp when loaded into DB
__synced_at
NOTE: There are three extractions being made for this report, due to dimension limits within an extraction. The primary table (ga.base_transactions) will contain the full set of columns while their stage tables (ga.base_transactions_stg2 and ga.base_transactions_stg3) will have a subset of metrics. Stage tables are stitched together to complete the primary table, updating rows with matching sync keys.
Related Resources:
Although the GA Core Reporting data extract is API based the best way to sample data is via the Query Explore supplied by Google:
illustrating the different tables and keys to join across tables.