The AB Tasty > GA4 Push Connector enables you to automatically send server-side experiment data from AB Tasty’s Feature Experimentation platform to Google Analytics 4 (GA4). This integration allows you to analyse how specific feature flags and variations impact your key metrics directly within GA4, without requiring client-side tracking.
Once configured, the connector pushes campaign and variation identifiers as custom events in GA4 whenever a decision is made for a visitor. This ensures consistent experiment tracking across both platforms, enabling more unified reporting and deeper behavioural insights.
Visitor ID requirement
To make this integration work, you must pass the correct GA4 user identifier when calling the Decision API.
What you must do
• Set a user ID in GA4 if you use your own identifier, for example:
gtag('set', { 'user_id': '12345' });
• Or retrieve the GA4 client ID using:
gtag('get', 'G-XXXXXXX', 'client_id', (clientId) => { console.log('Client ID:', clientId); });
• Call the Decision API with this same visitor ID, otherwise, the hit won’t be sent to the third party
How-to
1
on Google Analytics: Create Custom Events on GA4
Go to Admin → Data Display → Custom definitions
Create a custom dimension for:
flagship_campaign
flagship_variation
2
on Google Analytics: Generate an API Key
Go to Admin → Data streams → Measurement Protocol API secrets
Generate an API key
3
On AB Tasty: Create a GA4 Connector
Go to the Integration Hub > Feature Experimentation