Google Tag Manager

Use Google Tag Manager (GTM) to capture every Riddle interaction — views, starts, completions, lead form opt-ins, and more — and forward them to GA4, Meta Pixel, LinkedIn Insight, Google Ads, or any other tag in your container. Riddle pushes a RiddleEvent to your dataLayer, and GTM does the rest.

GTM tracking requires a Business or Enterprise Riddle plan.

Prerequisites

  • A published Riddle.
  • Admin access to a GTM container that's already installed on the page where you embed the Riddle.

If GTM isn't on your site yet, follow Google's guide on setting up and installing Google Tag Manager first.

Step 1 – Enable GTM tracking inside Riddle

  1. Open your Riddle and go to PUBLISH.
  2. Click on Tracking.
  3. Turn on the Google Tag Manager toggle.
  4. Save and republish the Riddle.
    turn on tag manager

Once the toggle is on, every Riddle interaction is pushed to your page's dataLayer as a RiddleEvent. Now you need to tell GTM how to listen for it.

Step 2 – Create the Data Layer Variable in GTM

This variable lets your tags read the type of event Riddle just sent (View, Start, Complete, etc.).

  1. In GTM, go to Variables → New.
  2. Choose Data Layer Variable as the variable type.
  3. Set Data Layer Variable Name to event_name.
  4. Set Data Layer Version to Version 2.
  5. Name the variable something recognizable — we use VAR - Riddle Event.
  6. Save.
    add variable

Step 3 – Create the Custom Event Trigger

The trigger tells GTM when to fire your tags — in this case, every time a RiddleEvent is pushed.

  1. Go to Triggers → New.
  2. Choose Custom Event as the trigger type.
  3. Set Event name to RiddleEvent (case-sensitive — capital R, capital E, no space).
  4. Under This trigger fires on, select All Custom Events.
  5. Name the trigger Trigger - Riddle Event.
  6. Save.
    add trigger

Step 4 – Create the GA4 (or other) Tag

Now connect the trigger to a tag that actually sends data somewhere. We'll use GA4 as the example, but the same pattern works for Meta Pixel, LinkedIn Insight, Google Ads, or any other tag in your container.

  1. Go to Tags → New.
  2. Choose your tag type — for example, Google Analytics: GA4 event.
  3. Select your GA4 configuration tag (or paste your Measurement ID).
  4. In Event Name, reference the variable from Step 2: {{VAR - Riddle Event}}. This dynamically uses the actual Riddle event name (View, Start, Complete, LeadCapture, etc.) instead of hard-coding a single value.
  5. Under Triggering, select Trigger - Riddle Event from Step 3.
  6. Save.
    add tag

For Meta Pixel, LinkedIn Insight, or another platform, swap the tag type but keep the same trigger and variable references — Riddle's events flow into all of them through the same dataLayer push.

Step 5 – Verify GTM loads on the page

Before testing the events themselves, confirm GTM is actually loading on the page where the Riddle is embedded.

  1. Install the Google Tag Assistant Chrome extension.
  2. Visit the page where your Riddle is embedded.
  3. Open Tag Assistant and confirm your GTM container ID (e.g. GTM-XXXXXX) appears in the list of detected tags.
    verify tag manager loads

If your container ID doesn't show up, GTM isn't installed on this page — fix that before continuing. This is a website setup issue, not a Riddle one.

Step 6 – Verify the RiddleEvent fires

Use GTM's built-in Preview mode to watch events flow in real time.

  1. In GTM, click Preview in the top right and connect to the page where your Riddle is embedded.
  2. Interact with the Riddle — view it, start it, answer a question, complete it.
  3. In the left timeline of the Tag Assistant debug window, look for entries named RiddleEvent.
  4. Click one and open the Data Layer tab to see the full payload — you should see fields like event_name, riddleId, riddleTitle, blockType, blockTitle, and playTimeInMilliseconds.
    verify event

If you see RiddleEvent entries in the timeline and your tag shows as Fired, you're done — events are flowing into your analytics stack.

Available data

Every RiddleEvent push includes a set of fields you can pull into GTM as additional Data Layer Variables (same setup as Step 2, just with a different variable name).

FieldWhat it contains
event_nameType of interaction — View, Start, Complete, LeadCapture, etc.
riddleIdUnique ID of the Riddle
riddleTitleTitle of the Riddle
blockTypeType of block the user interacted with (e.g. Question, Form, Result)
blockTitleTitle of the specific block
playTimeInMillisecondsTotal time spent in the Riddle so far
isAutoSubmittrue if the answer was auto-submitted, false if the user clicked submit

For the full list of events and properties, see JS Events.

Troubleshooting

  • No RiddleEvent showing up in Preview mode? Confirm the Google Tag Manager toggle is on in the Riddle's Tracking settings, and that you republished the Riddle after enabling it.
  • Tag not firing even though the event appears? Check that your trigger event name is exactly RiddleEvent — capital R, capital E, no space, no typo.
  • GTM not loading on the page at all? Your container snippet isn't installed on the page where the Riddle is embedded. That's a website setup step outside Riddle.
  • Event name shows as undefined in your tag? The Data Layer Variable in Step 2 needs to be event_name exactly, with Data Layer Version set to Version 2.