Google Analytics is the most popular web performance tool out there. Nearly every web app uses it. And given the metrics that GA collects — sessions, pageviews, conversion rates, page load timing — it’s a logical dataset to pair with feature flags. So we’re excited to announce our latest, very highly requested, integration with Google Analytics.
Let’s look under the hood and see what it can do.
To begin, there are two key aspects to understand about integrating with Google Analytics — it’s bi-directional, and it uses SDKs.
Bring Data In, Push Data Out — Analyze Wherever You Want
First, you can send or receive data. This is a two-way integration.
Receive data from GA: You can use these metrics to monitor each feature flag for defects and experiment on new features to determine their impact. Want to determine the lift (or reduction) in time on page for your onboarding flow? Split does that stat for you and calculates the result.
Send data to GA: You can slice, dice, and segment your reporting to your heart’s content. Split provides the feature context — which users see which features. Want to know average time on page for users that saw your new onboarding flow? Easy.
Integrate with Google Analytics and Split Client-Side
Google Analytics to Split: Get Your Data Flowing
Let’s jump in. Sending data from GA to Split gives you the power to:
- Set alerts in Split on every new feature that degrades performance, as measured by GA.
- Run experiments in Split that calculate the impact on any GA metric you care about.
So how does this work? Follow along in the docs, if you want. Two things are needed:
To require our plugin, you just need to use the GA ‘require’ command on the trackers you want. Ideally, the ‘splitTracker’ plugin should be required as early as possible, since any hits being tracked before that won’t be picked up by the integration.
The second step is to tell the Split SDK you want to turn on the integration. Sounds easy? It is! Don’t trust us? You can read more about how SDK integrations work.
The constant type for this integration is
GOOGLE_ANALYTICS_TO_SPLIT. By default all impressions and events are tracked for the
trafficType provided in the configuration settings.
The default prefix “ga.” is used for the event types. Event types will be based on the hit data with some constraints to comply with the event type rules. For example, if tracking a pageview hit using
ga('send', 'pageview', '/myPagePath') the eventType will be
'ga.pageview' in Split:
That’s it! Data will flow through. Every time a given GA hit takes place, we’ll translate it to a Split event for which the
eventType will be prefixed with
ga. For example, the pageview event would be
ga.pageview. It’ll have an
EventProperty “page” with the current page path. (Read more about default mappings.)
Once the events are in Split, you can easily use the metric builder to ensure you are measuring exactly what you want, as well as do counts, sums, averages, percent, etc. You can also define whether the data is per user, account, or use the custom granularity you track in GA.
Google Analytics to Split: Protection from Bad Features, Identification of Good Features
Now that you have GA data in Split, you can tie together your web performance data and feature data without having to track all those metrics a second time in Split. You can do all sorts of fun stuff.
One example is setting an alert when a metric degrades. Say ‘session duration’ plummets; this is probably not a good sign. Split will easily identify the feature responsible for the issue. Not only that, we’ll also send the alert to the team who owns that feature flag.
Let’s run an experiment (A/B test) that measures a key goal of your feature. Say you want to increase purchases in your application. Or maybe you need to measure multiple goals: total purchases completed as well as the % of purchases completed. Easy. Split reports each of these metrics back to you in our metrics scorecard, combined with statistical significance to determine a causal relationship. Now you can distinguish real impact from chance.
Split to Google Analytics: Get Set Up
Let’s back it up, flip it, and reverse it. Sending impression data from Split to GA gives you the power to perform your usual analysis in GA, but now you can slice and dice the data with feature-based segments of your users.
That’s it! Done! Now data is flowing into GA.
Split to Google Analytics: Filter and Segment by Feature
The data from Split can be configured to show up in GA as a custom dimension with a hit-level scope. You can use custom dimensions to filter your reports and to create segments in your GA charts.
Track the Performance of Every Feature
There you have it. You can now easily import and export data between Google Analytics and Split. No need to track additional events or reconcile your data streams. And you can use this data combo to make sure every feature you release doesn’t blow up your SLOs (service level objectives) and performs well for your KPIs. Achievement unlocked!
Who isn’t out there excited to get testing with Split and Google Analytics? Interested in more content to inform your experimentation plans? We’ve got you covered:
- Managing Feature Flag Retirement and Technical Debt
- Know Your Why: Experimentation and Progressive Delivery At Walmart Labs
- Querying Split Impressions in New Relic for More Insight into Your Metrics