Analyzing in GA4

Turning on the Google Analytics card gets your experiment data into GA4. Getting a trustworthy answer out of GA4 takes one more decision, and it is the decision most people get wrong the first time.

This page covers what lands in GA4, the trap that makes conversion reports look empty, and the three ways to analyze that actually work.

What lands in GA4

A variation is one specific version being tested: the control, or one of the challengers. When a visitor is shown one, we send an experience_impression event carrying exp_variant_string, in the form AVSB-<experiment id>-<variation id>. GA4 has a built in experiment dimension that reads that field with no setup from you.

A visitor who is in three live experiments produces three of these events, one per experiment, each with its own AVSB-... value. So when you analyze, filter on the exact value for the experiment you care about.

experience_impression is the standard name we use for GA4. If you renamed the experiment view event on the card, use your own name everywhere this page says experience_impression. The Google Analytics page lists every field we send, for every event type.

The trap: the variant travels with one event only

GA4 calls a variation a "variant". Same thing, different word.

Read this before you build a report

exp_variant_string belongs to the event it was sent with. It does not attach itself to that visitor's later events. Your purchase event, your sign_up event, and your own custom conversions do not carry it.

The failure this causes looks like a bug in A vs B, and it is not:

  1. You see 12,000 experiment views split neatly across two variations.
  2. You open your conversion report, add the variant dimension, and get 3 conversions. Or none.
  3. It looks like the experiment killed your conversion rate.

What actually happened is that GA4 was asked to show conversions that carry a variant value, and almost no conversion event carries one. The number is not a low conversion rate, it is a near empty join.

This is the single most common support question for every A/B tool that sends data into GA4. The fix is to stop filtering conversion events by a field they do not have, and to pick one of the three approaches below instead.

Approach 1: send the conversion itself (simplest)

The least work, and the most reliable. In Project Settings > Integrations, on the Google Analytics card, tick Conversions and Purchases, with revenue under Also send.

Now the conversion event itself carries the experiment and variation, as avsb_experiment_id, avsb_experiment_name, avsb_variation_id and avsb_variation_name. Nothing has to travel across events, because the answer is already on the row you are counting.

1

Turn the extras on

Tick Conversions and, if you sell online, Purchases, with revenue. Save, and give it about a minute to reach your site.

2

Register the fields once

The avsb_ fields are event parameters. Register the ones you want in GA4's custom definitions as event scoped custom dimensions, so they can be used in standard reports. In Explore they are available without registering.

3

Break the report down by variation

Count the A vs B conversion events, split by avsb_variation_name. No segment, no filter on the impression event.

These are our events, not your existing ones

The conversions we forward are separate events from the conversions you already track in GA4. They are counted against the goals you configured in A vs B. So the totals will not match your own conversion events, and one visitor action can produce several of ours. Why counts differ explains exactly when and why.

Approach 2: user segments (use your own conversions)

Use this when the conversion you care about is one GA4 already records, such as your own purchase event. It measures that conversion per variation without changing what you send.

The idea: instead of filtering conversions by a field they do not have, build a group of users who saw a given variation. Then look at what those users did afterwards.

1

Start an exploration

In GA4's Explore area, create a new exploration.

2

Create a segment of users, not events

Add a segment and choose the user scoped type. An event scoped segment would give you back only the impression events themselves, which is the trap again.

3

Set the condition to the experiment view

The condition is: the user triggered the event experience_impression where the parameter exp_variant_string equals your value, for example AVSB-482-1913.

4

Repeat for each variation

One segment per variation, each with its own AVSB-... value. Two variations means two segments.

5

Compare your normal metrics across the segments

Apply the segments side by side and add whatever you already measure: conversions, revenue, sessions. Every metric is now scoped to people who saw that variation.

Two things to know before you trust the output. GA4 needs time to process new data into explorations, so a segment built minutes after switching the integration on will look empty. GA4 also counts users its own way, not the way A vs B identifies visitors. So the totals will be close, not identical.

Approach 3: the BigQuery export (most exact)

If you have GA4's BigQuery export switched on, you can do the join properly. Read each user's variation from the impression event, then look at every other event that user produced.

SQL
WITH exposures AS (  SELECT DISTINCT    user_pseudo_id,    (SELECT value.string_value FROM UNNEST(event_params)      WHERE key = 'exp_variant_string') AS variant  FROM `your_project.analytics_XXXXXXXX.events_*`  WHERE event_name = 'experience_impression')SELECT  e.variant,  COUNT(DISTINCT e.user_pseudo_id) AS visitors,  COUNT(DISTINCT IF(a.event_name = 'purchase', a.user_pseudo_id, NULL)) AS purchasersFROM exposures AS eLEFT JOIN `your_project.analytics_XXXXXXXX.events_*` AS a  ON a.user_pseudo_id = e.user_pseudo_idGROUP BY e.variant
SQL16 lines

Swap in your own project and dataset, and your own conversion event name in place of purchase.

Every event we send also carries a unique event ID, so a single row can be matched exactly rather than approximately. Count distinct event IDs when you want a count of real events. See why counts differ for which of our events line up one to one, and which do not.

The export only covers data from the day you switched it on

GA4 does not backfill BigQuery. If you need this for an experiment, switch the export on before the experiment starts.

Which approach should I use

SituationUse
You want an answer today, with the least setupApproach 1: send the conversion itself
The conversion already lives in GA4 and you do not want to change what you sendApproach 2: user segments
You need exact numbers, custom windows, or your own SQLApproach 3: BigQuery

A vs B is still the decision maker

GA4 is the right place to see your experiment next to everything else you measure. It is not the right place to decide whether a variation won. Your A vs B results page counts visitors rather than events. It also removes your own preview and internal traffic, and runs the statistics that tell you whether a difference is real.

Use GA4 to explore and to answer the questions only your own data can answer. Use the results page to call the winner.

Sanity check the wiring first

On the Integrations tab, use Send a test event. It opens your site and sends one clearly labelled test event to every tool you have switched on. You need at least one live experiment for this to work. GA4's DebugView and Realtime report show it immediately, while standard reports can take up to 24 hours.

Was this helpful?