Skip to content
How-to guideUpdated on 19 Nov 2026

Send story events to Google Analytics 4 with Tag Manager

Connect a story to Google Analytics 4 through Google Tag Manager, so you can see how many people started a story, where they dropped off, what they answered and how many clicked through. You set it up in Tag Manager, then register the extra details in Analytics so they show up in reports.

Topics
On this page

What you need first

This setup builds on the data layer events explained in Story events with Google Tag Manager. Read it first if you haven't.

What you needLooks likeWhere to find it
Tag Manager container IDGTM-XXXXXXXAt the top right of your Tag Manager workspace. Usually already added in Intractive. If not, add it under Project settings > Tracking & scripts: in the Tools section, click Add next to Google Tag Manager, paste the ID and click Save at the bottom of the section. You need the admin role in the project.
Analytics measurement IDG-XXXXXXXXXXIn Analytics, under Admin > Data streams > your web stream

The data stream screen also shows a Google tag ID that starts with GT-. Both work, but use the one that starts with G-. The steps in this article use it.

If you don't have an Analytics property yet, create one first. In Analytics, go to Admin > Create property, then add a Web data stream for your story's address. That is your project's custom domain if it has one, otherwise its subdomain, otherwise web.intractive.app. Set the time zone and currency to your own, not the defaults.

Tags you load through Tag Manager are your responsibility under GDPR, ePrivacy and similar rules. Intractive doesn't show a cookie banner for them on your behalf, so you set up consent in Tag Manager.

Without Tag Manager, a superadmin can add your Analytics measurement ID to the project directly. Stories then send their own events, such as story_start, story_progress and story_complete. If you use both routes with the same Analytics property, events are counted twice, so use one route per property. Ask your Customer Success Manager if you'd like the direct route instead.

Add the Google tag

This tag loads Analytics on the page, and everything else depends on it. Its Tag ID decides which Analytics property receives your events. The other tags and triggers decide when to send them.

  1. In Tag Manager, go to Tags > New.
  2. Choose the tag type Google tag.
  3. In Tag ID, enter your G-XXXXXXXXXX ID.
  4. Set the trigger to Initialization - All Pages.
  5. Name the tag GA4 - Config.
  6. Click Save.

Create the variables

Variables pull the details out of each story event so you can use them. Create each one under Variables > New > Data Layer Variable, and leave the version at its default.

Name itData layer variable nameWhat it gives you
DLV - storyIdstoryIdWhich story
DLV - sessionIdsessionIdOne playthrough, so one visitor's run stays together
DLV - milestonemilestoneThe milestone just passed: 0, 25, 50, 75 or 100
DLV - progressprogressPercentage complete, as a whole number
DLV - depthdepthHow far the visitor got, as a block position counting from 1
DLV - totaltotalHow long the story is. On progress events this is the live number of blocks, which can grow when a branch opens. On milestone events it's the story's potential length.
DLV - outboundUrlurlWhich link was clicked, including any UTM parameters Intractive adds

The data layer variable name must match the story's field name exactly, including capital letters. storyid won't work where storyId is expected. If a variable comes back empty when you test, a capitalisation slip here is almost always the cause.

To capture an answer, add one more Data Layer Variable for each answer you care about. Use the variable name from your story with variables.@ in front of it, for example variables.@timeline for a story variable called timeline. Each time a variable changes, the story sends the current value of every variable again.

Create the triggers

Triggers decide when a tag fires. They're all Custom Event triggers, created under Triggers > New. For a condition, limit the trigger to events where the variable matches the value in the table.

Name itEvent nameCondition
CE - Story ProgressintractiveStoryProgressAll custom events
CE - Story StartintractiveStoryMilestoneDLV - milestone equals 0
CE - Story HalfwayintractiveStoryMilestoneDLV - milestone equals 50
CE - Story CompleteintractiveStoryMilestoneDLV - milestone equals 100
CE - Variables UpdatedintractiveVariablesUpdatedAll custom events
CE - Outbound LinkintractiveOutboundLinkAll custom events

The start, halfway and complete triggers use intractiveStoryMilestone. It fires at most once per milestone per playthrough, and its values only move forward, so you don't need Once per page on the tags that use them.

Milestone 0 fires as the story opens, before the visitor answers anything. Milestone 100 fires only when the story is complete. Reaching the last block isn't enough, but a story that ends by redirecting the visitor counts as complete when they reach that block. A playthrough resumed on a later visit doesn't report the milestones it passed before, including 0.

Milestones 25 and 75 fire too, so you can add triggers for them in the same way.

Create the event tags

Create one tag for each event you want in Analytics. Each is a Google Analytics: GA4 Event tag, with the measurement ID set to your G- ID.

Event name to sendDetails to includeTrigger
intractive_story_startstory_id, session_id, total_blocksCE - Story Start
intractive_block_viewstory_id, session_id, block_index, total_blocks, progressCE - Story Progress
intractive_progress_50story_id, session_idCE - Story Halfway
intractive_story_completestory_id, session_id, total_blocksCE - Story Complete
intractive_answerstory_id, session_id, plus the answers you choseCE - Variables Updated
intractive_outbound_clickstory_id, session_id, link_urlCE - Outbound Link

Add each detail under Event Parameters as a name and a value. The value is the matching variable you created, for example parameter story_id with value {{DLV - storyId}}.

intractive_block_view fires each time the visitor's progress changes, usually once to twice per content block, and once when the story loads. A completed story sends roughly one to two events per content block, so the count grows with the length of the story and its branches. It's roughly 12 to 20 events only for a story of about that size. This volume is what makes drop-off analysis possible, such as 'we lose 40% of visitors at block 4', and it's well inside Analytics' free limits. If your reports feel noisy, switch this tag off first.

Register the details in Analytics

Analytics collects your extra details but won't report on them until you register each one by hand. This step is often missed, and nothing works properly without it.

Add custom definitions

In Analytics, go to Admin > Custom definitions and add each of these with the Event scope.

Register asNameEvent parameter
Custom dimensionStory IDstory_id
Custom dimensionSession IDsession_id
Custom dimensionLink URLlink_url
Custom metric (integer)Block indexblock_index
Custom metric (integer)Total blockstotal_blocks
Custom metric (integer)Progressprogress

Mark completion as a key event

  1. In Analytics, go to Admin > Events > Key events.
  2. Mark intractive_story_complete as a key event.

It then counts as a conversion and can be imported into Google Ads.

Test, then publish

  1. In Tag Manager, click Preview and enter a published story link. Unlike the tags a superadmin adds directly, the Tag Manager container and its events also run on builder previews and for signed-in editors.
  2. Tap through the story. You should see intractiveStoryMilestone as the story opens and at each milestone, intractiveStoryProgress once on load and then once or twice per block, intractiveVariablesUpdated when you answer and intractiveOutboundLink if you click out.
  3. Click an event.
  4. Open the Variables tab. Your DLV - variables should have values, not undefined.
  5. Finish the story and check that the complete tag fired once, not once per remaining block.
  6. In Analytics, open Admin > DebugView and watch the same events arrive with their details.
  7. In Tag Manager, click Submit to publish. Nothing reaches real visitors until you do.

After publishing, your own browser may keep serving the previous version of the container for up to 15 minutes. If your changes don't seem to be live, do a hard refresh before assuming something is broken.

Read the results

Use Reports > Engagement > Events for the volume of each event. Use Explore for a free-form drop-off view: put block_index against event count to see exactly which block loses people.

The block where the curve flattens is where visitors commit, and everyone past it tends to finish.

Build completion rates on the start, halfway and complete events. Every later milestone is a share of the visitors who reached milestone 0.

Next

Did this help?