Google Analytics: Tips and best practices#
Understanding connector capabilities and limitations#
The Google Analytics (Universal Analytics) connector provides comprehensive web analytics data including traffic, sources, events, revenue, paid and organic performance metrics.
Important note: With Google’s transition to GA4, Universal Analytics data collection ended on July 1, 2023. Clients moving to GA4 should be aware that custom fields will not be transferred, requiring both Google Analytics and GA4 datastreams if these reports are still needed.
Data collection strategy and account management#
Authentication and setup recommendations#
Smaller clients: Fetch multiple accounts in a single datastream for simplified management
Larger clients: Split accounts into separate datastreams to optimize performance for large datasets
Local data retention and overwrite settings#
Recommended local data retention: Unique by day using ga:date
Recommended overwrite: By date range using ga:date
Available granularity levels#
The connector supports data collection at multiple levels:
Account level - Overall account performance metrics
Property level - Website property-specific data
View level - Filtered view of property data
Field compatibility and datastream design#
Critical limitation: Not all fields are compatible with each other in Universal Analytics. This requires careful datastream planning.
Datastream separation strategy: - Separate user metrics into dedicated datastreams - Consider end reporting requirements before creating datastreams - Many clients reduce user metric requirements once they understand each breakdown requires a separate datastream
Visualization and filtering best practices#
Filter widgets by datastream to avoid double counting metrics
Use clear schema mapping (e.g., users_daily_by_page)
Filters are primarily used for reporting unique users for specific segments
Understanding user metrics and aggregation#
newUsers metric handling: - newUsers is aggregatable within the same datastream - Fetch newUsers in your aggregatable datastreams - Use userType in your non-aggregatable user datastreams
New vs. returning users reporting: - To compare new vs. returning users, use the users metric together with the userType dimension. - newUsers (metric) and userType (dimension) behave differently:
newUsers counts each user only once as “new” and does not update if they return.
userType can change for a user: a user is “new” on their first visit and “returning” on subsequent visits.
Use newUsers when you need the count of users who are new to your site.
Use userType for segmenting or comparing new and returning users in your analysis.
Advanced filtering and segmentation#
When to use datastream filters: Filters in datastream settings are not commonly used. For aggregate metrics, it’s easier to filter data using enrichments after fetching. However, filters are necessary for specific user segments because users is a non-aggregatable metric.
Filter examples:
Page-specific user filtering:
`
ga:pagePath=@/blog
`
Results show unique users who viewed a blog page.
Transaction-based user filtering:
`
Dynamic segments users::condition::ga:transactions>0
`
Results show unique users who transacted in at least one session.
Performance optimization techniques#
Force daily fetch considerations: - Can slow down fetches and deplete API quotas - Only way to avoid sampling in Universal Analytics - Use judiciously based on data accuracy requirements vs. performance needs
API quota management: - Monitor daily API quota usage - Stagger datastream schedules to distribute API calls - Consider reducing fetch frequency for less critical data
Recommended datastream configurations#
Google Analytics | Traffic & Events | by Country Standard datastream with basic metrics for geographic analysis.
Google Analytics | Age & Gender Demographic breakdown requiring separate datastream due to field compatibility limitations.
Google Analytics | Acquisition Source and medium analysis for traffic acquisition insights.
Google Analytics | New Vs. Returning Users | Daily | by View User behavior analysis with proper metric and dimension selection.
Setup validation checklist#
Visualizations: widgets filtered by datastream
Users have clear schema mapped (e.g., users_daily_by_page)
Appropriate user metrics separated into dedicated datastreams
Force daily fetch used only when sampling avoidance is critical
Field compatibility verified for all selected dimensions and metrics
Migration considerations#
As Universal Analytics data collection has ended, plan for: - GA4 implementation for ongoing analytics needs - Historical data preservation through continued UA datastream access - Custom field documentation as these won’t transfer to GA4 - Dual reporting setup if both UA historical and GA4 current data are required