Google Analytics lets you analyze data about customer engagement with your website or application.
Google Analytics only allows us to connect to the reporting layer of their API, so we can’t access all the raw data like we can for many of our other connectors. Instead, Google requires that it must be queried via a pre-defined report. Each time you go through the setup form, you’ll be creating at least one new report.
Follow our step-by-step Google Analytics setup guide to connect Google Analytics with your destination using Fivetran connectors.
2-day rollback synclink
During every sync for our Google Analytics connectors, we sync data from the last 2 days due to processing latency in Google Analytics. The processing latency depends on how many sessions a Google Analytics account sends and may be up to 48 hours.
7-day and 30-day trailing synclink
By default, Google Analytics gives you a lookback window of 30 days to track conversion-related data. A conversion takes place when a visitor to your website takes a relevant action and converts to a customer. This can be through completing a purchase, filling out a form, or by simply showing a high level of engagement with your website.
For example, let’s say a customer makes a purchase on your website, and the goal of your analytics is to track completed purchases:
Day 1 - your website visitor adds several items to the cart and decides to not take any action.
Day 4 - the visitor adds a few other items to the cart but is still not ready to purchase.
Day 25 - the visitor goes back to the website and pays for the purchase.
Thus, the conversion goal is achieved on Day 25. A lookback window describes how far back you want to trace the data of your customers. The window considers conversion-related data from 30 days before the ultimate conversion.
We use a 7-30 trailing window approach to get your conversion-related data for the last 30 days. Once a day, we sync 1 day’s worth of data from both 7 days ago and 30 days ago.
This approach allows us to fetch all of your important data using fewer API calls than a rollback sync. We don’t use a rollback sync for the entire 30-day period because every sync would take a long time and exceed the API quotas that are limited in the Google Analytics API.
When you sync Google Analytics with Fivetran, the following three features affect the nature of your connector:
Users who aren’t on the Google Analytics 360 tier of Google Analytics get sampled data when their reporting query exceeds Google’s pre-defined compute threshold. The query’s computational load is driven by both the volume of data that needs to be queried and by the complexity of the aggregations. Fivetran minimizes sampling by querying for data in single-day increments. You can find more information on sampling in Google Analytics’ documentation.
Google Analytics 360 users may also get sampled data, however, they can have all the raw row-level data loaded into their Google Cloud Storage, which we also sync with your warehouse.
A segment is a subset of your analytics data. For example, of your entire set of users, one segment might be users from a particular country or city. Another segment might be users who purchase a particular line of products or who visit a specific part of your site. Some dimensions and metrics reports cannot be queried together, and in this case our setup form will display an error. You can find more information about choosing dimensions that don’t clash in our setup instructions.
filters query string parameter restricts the data returned from your request. To use the
filters parameter, supply a dimension or metric on which to filter, followed by the filter expression. For example,
ga:country==United States&ga:browser==Firefox, given the request will return data only for the country
United States and browser
Firefox. The filter expression should contain only those dimensions and/or metrics which you have chosen in your setup form.
Potential data mismatchlink
Metrics values reported by Google Analytics heavily depend on which dimensions are set up for the report. The values you see in your Google Analytics dashboard versus in your destination table might not match if the dimensions in the dashboard and the dimensions requested by the Fivetran connector do not match.
We recommend using Query Explorer provided by Google Analytics to compare your data between the source and destination. Make sure that you specify the same dimensions, metrics, and filters in Query Explorer as you specified in your Fivetran setup form.
Another important factor that affects metric values (numbers and values of conversions) is a lookback window. The Google Analytics User Interface lets you adjust the lookback window from 1 to 90 days, while the Google Analytics API utilized by Fivetran connector uses a non-adjustable 30-day lookback window. If you set the lookback window in your Google Analytics UI to anything other than 30 days, you may observe data mismatch.
The connector syncs conversion-related data using the 7-30 day trailing window approach so that fresh data for the last 30 days is delivered to the destination.
The connector uses the Google Analytics Reporting API v4 to access the source.
We provide the following types of reports:
- Prebuilt Report
- Custom Report
Fivetran will deliver tables with the
unique_id fields for either kind of report.
A Prebuilt Report syncs a pre-defined set of fields. See the full list of our Prebuilt Reports.
For a Custom Report, you can add up to six additional dimension fields and ten additional metric fields.
Because the Google Analytics data is delivered in a cube, changing the way that the cube is formatted is difficult; adding in (or removing) fields changes the way the data is aggregated and synced. This would require that we alter the data in your existing warehouse to ensure consistency.
To ensure that the data you’re receiving is reliable, we require that you create an entirely new connector for the updated version of your Google Analytics report. You must either:
- Name this new/modified report something different than the previous version. Or
- Keep the name of the new/modified report and sync it into a different schema.
NOTE: Google Analytics delivers optimal performance in the context of intraday data refreshes. You can find the details documented here.