Appearance
Analytics Integration
Dalton sends an event to Google Analytics 4 each time a visitor sees an experiment, tagged with the variant they were shown. You can use it to check an experiment's results against your own GA4 data, such as revenue, purchases and conversion rate per variant.
Events · Setup in GA4 · Confirm experiment data · Google Tag Manager
Events Sent to Google Analytics
On every page visit where an experiment is active, Dalton sends this event:
| Event | Parameter | Value | Purpose |
|---|---|---|---|
dalton_experiment | variantId | The active variant's ID | Identifies which experiment variant the visitor is exposed to |
Where to find the variant IDs: open the experiment in Dalton. The experiment detail screen shows the ID of each variant. Note the IDs of the variants you want to compare, because you'll need them to build the report below.
Always pushed to the data layer
The event is pushed to window.dataLayer on every qualifying page visit, even if you haven't connected GA4 to Dalton. You can pick it up in GTM (or any other tool that reads the data layer) before you finish the GA4 integration.
Setup in Google Analytics
Step 1: Verify Events Are Coming In
Before you set anything up, confirm that GA4 is receiving Dalton's events.
- In GA4, go to Reports → Realtime → Overview
- Open a page on your site where a Dalton experiment is active
- In the Realtime report, check the Event count by Event name card and confirm that a
dalton_experimentevent shows up and is counting
If dalton_experiment appears, data is flowing and you can continue. If it doesn't show up within a minute or two, the events aren't reaching GA4 yet. If your GA4 runs through GTM, see the Google Tag Manager section below.
Step 2: Register variantId as a Custom Dimension
Register the variantId parameter as a custom dimension so you can use it in segments, explorations and audiences.
- Go to Admin → Custom definitions → Custom dimensions
- Click Create custom dimension
- Set:
- Dimension name:
Dalton Variant ID(the label you'll see in reports) - Scope: Event
- Event parameter:
variantId
- Dimension name:
- Click Save
No backfill
Custom dimensions only apply to data collected after they're created, and can take 24–48 hours to populate. Create this before (or as soon as) you launch the experiment.
Confirm Experiment Data in GA4
With variantId registered, you can build a report that compares the variants of an experiment side by side on your own GA4 metrics.
Step 1: Create a segment per variant
- In GA4, go to Explore and start a Blank exploration. Name it after the experiment.
- Set the date range to the dates the experiment has been running.
- Next to Segments, click + and choose Session segment.
- Name it after the variant (for example
Variant A – <variant ID>). - Add a condition: pick the
dalton_experimentevent, click Add parameter, choose Dalton Variant ID, and set it to exactly matches that variant's ID. - Click Save and apply.
- Repeat for the other variant, so you end up with one segment per variant ID.
Purchases in a later session
A session segment only counts purchases made in the same session the visitor saw the variant. If your customers often buy on a later visit, create User segments with the same condition instead.
Step 2: Build the comparison
- Under Dimensions, click + and add Device category, then drag it into Rows. This splits the numbers by device, and a Totals row shows the overall figure for each variant.
- Under Metrics, click + and add the metrics you want to compare, for example:
- Sessions
- Ecommerce purchases
- Purchase revenue
- Session key event rate (conversion rate)
- Average purchase revenue
- Drag the metrics into Values.
- Drag both variant segments into Segment comparisons.
The table now shows each variant side by side, with its sessions, purchases, revenue and conversion rate from your own GA4 data.
Expect the numbers to differ from Dalton
GA4 and Dalton attribute sessions differently, filter bots differently, and are affected differently by consent settings and ad blockers. GA4 also samples large explorations. The absolute numbers won't match Dalton exactly. What matters is whether the two sources point in the same direction. For the uplift figure and its confidence interval, use the experiment's results screen in Dalton. See Reading Results.
Google Tag Manager
If your GA4 setup runs through Google Tag Manager, the dalton_experiment event and its variantId parameter won't reach GA4 unless you forward them with a tag in GTM.
📥 Download the GTM container template and import it into GTM to set everything up in one go.
To import the template:
- In GTM, go to Admin → Import Container
- Select the downloaded file
- Choose your workspace
- Pick Merge (so it doesn't overwrite your existing setup) and confirm
- Publish
Important: set your own GA4 Measurement ID
The template ships with a placeholder ID, so you must replace it with your own before you publish. In GTM, click the created Dalton_Tag and set the Google Analytics Measurement ID field to your GA4 Measurement ID (the G-XXXXXXXXXX). Until you do, no events will reach your GA4 property.
Where to find your Measurement ID:
- Log in to your Google Analytics account
- Click Admin (the gear icon) in the bottom-left corner
- Under the Property column, click Data collection and modification, then select Data streams
- Click the Web tab and select your website's data stream
- Your Measurement ID is displayed in the top-right corner of the stream details window
If you'd rather build it by hand, you don't need to set up the variables and trigger first. Start from a new tag and create them inline as you go.
Step 1: Get your GA4 Measurement ID
Copy your GA4 Measurement ID (the G-XXXXXXXXXX). You'll paste it into the tag in the next step.
How to find your Measurement ID:
- Log in to your Google Analytics account
- Click Admin (the gear icon) in the bottom-left corner
- Under the Property column, click Data collection and modification, then select Data streams
- Click the Web tab and select your website's data stream
- Your Measurement ID is displayed in the top-right corner of the stream details window
Step 2: Create the GA4 Event tag
Go to Tags → New, click Tag Configuration, and choose Google Analytics: GA4 Event. Name the tag Dalton_Tag and set:
- Measurement ID: paste the
G-XXXXXXXXXXyou copied in Step 1 - Event Name: click the variable picker (the icon to the right of the field), pick Built-In Variables, and enable/select Event so the field becomes
{{Event}}. This forwards the original event name (dalton_experiment) unchanged.

Step 3: Add the event parameters (creating the variables inline)
Still in the tag, expand Event Parameters and click Add Row for each parameter. For each row, click the variable picker on the Value field, then + (New Variable) → Data Layer Variable to create it on the spot:
| Parameter Name | New variable | Data Layer Variable Name |
|---|---|---|
variantId | Dalton - Variant ID | variantId |
type | Dalton - Type | type |
variantId is the one you need for experiment reporting. The type row is included in the container template, and you can leave it in.
Each Data Layer Variable should look like this (here, Dalton - Type reading the type key):

Step 4: Add the firing trigger (created inline)
Still in the same tag, click the Triggering box, click + (New) in the top-right, then choose Trigger Configuration → Custom Event and set:
- Name:
Dalton - All Events - Event name:
dalton*with use matches RegEx ticked. This fires ondalton_experiment.

Save the trigger, then Save the tag. Your finished tag should look like this:

Step 5: Preview and publish
Before publishing, click Preview in GTM and load a page on your site where a Dalton experiment is active. In the Tag Assistant preview window, you should see Dalton_Tag fire on the dalton_experiment event with the variantId parameter populated.
To check it's reaching GA4, go to Reports → Realtime → Overview in Google Analytics. You should see dalton_experiment events coming in.
Once that looks right, click Submit / Publish to make the container live.
Custom events blocked in GTM?
Some GTM setups restrict which custom events can be forwarded to GA4. If dalton_experiment isn't showing up in GA4, check that the Dalton - All Events trigger isn't blocked by an exception or a consent setting, and that it's set as the tag's firing trigger.
Step 6: Continue in Google Analytics
Once the events are reaching GA4, register the custom dimension and build your report.