GA4 audience sync
Overview
Zenstep can sync with Google Analytics 4 to use GA4 audiences as targeting criteria. This lets you show flows to users who are already in GA4 segments you've built — without duplicating your audience logic in Zenstep.
Common use cases:
- Show an upgrade prompt to users GA4 identifies as "high engagement, free plan"
- Show a win-back flow to users GA4 marks as "at-risk of churning"
- Promote a feature to users who have visited related pages (GA4 behavioral audiences)
Prerequisites
- A Google Analytics 4 property with existing audiences configured
- Owner role in your Zenstep organization
- The Zenstep snippet installed and calling
identify()with the same user ID used in GA4
Connecting GA4
- 1
Go to Settings → Integrations
In the dashboard, navigate to Settings → Integrations and click Connect next to Google Analytics 4.
- 2
Authorize with Google
You'll be redirected to Google to authorize read access to your GA4 property. Sign in with a Google account that has access to the GA4 property.
- 3
Select your GA4 property
After authorization, select the GA4 property from the dropdown and click Save.
- 4
Wait for the first sync
Audience data syncs every 24 hours. The first sync happens within 24 hours of connecting.
How the sync works
Zenstep requests audience membership data from the GA4 Data API daily. For each user, it stores which GA4 audiences they belong to. When the snippet evaluates targeting rules, it checks this stored membership.
Sync frequency: Once every 24 hours. GA4 audience membership is not real-time — there's up to a 24-hour lag between a user joining a GA4 audience and Zenstep reflecting that.
User matching: Zenstep matches users by the ID you pass to identify(). For this to work, the same user ID must be sent to GA4 as the user_id parameter.
To set user_id in GA4:
gtag("config", "G-XXXXXXXX", {
user_id: "user-123", // must match what you pass to zenstep.identify()
});
Using GA4 audiences in targeting rules
Once connected, GA4 audiences appear as an option in the targeting rule builder.
- Open a flow's targeting settings
- Click Add rule
- Select GA4 audience
- Pick the audience from the list
- Set the operator: is member of or is not member of
Example — show to users in the "High value, free plan" GA4 audience:
GA4 audience is member of High value, free plan
Limitations
- 24-hour lag — GA4 audience sync is not real-time
- User ID required — anonymous users (those you haven't called
identify()for) are not matched - GA4 audiences must exist — Zenstep reads audiences, it does not create them. Build your audiences in GA4 first.
- Available on Grow and Scale plans — GA4 sync is not available on the Free plan
Disconnecting GA4
Go to Settings → Integrations and click Disconnect. Existing flows using GA4 audience rules will stop matching (no users will be members of the audience once disconnected). Update those flows before disconnecting.
Was this helpful?
Related articles