Skip to main content

Track embedded experiences with Google Tag Manager

Use Google Tag Manager to track embedded Experience completions.

When you embed a BlueConic Experience on your website, you can use Google Tag Manager (GTM) to track conversions or engagement. This setup is especially useful when you want to fire pixels or send event data when someone completes an embedded Experience.

There are two common ways to track completion:

  • use a redirect-based setup when the Experience sends participants to a thank-you page

  • use an on-page event setup when the Experience completes without redirecting


Before you begin

Make sure you have:

  • access to the published embedded Experience code

  • access to Google Tag Manager

  • the tag or pixel you want to fire in GTM

  • a clear understanding of whether the Experience redirects after completion or completes on the same page


Embed the Experience through GTM

1. Copy the embed code

  1. Open your Experience.

  2. Click Publish.

  3. Select Embed > On Your Website.

  4. Choose Embedded.

  5. Copy the iframe embed code.

2. Create a Custom HTML tag in GTM

  1. In GTM, go to Tags > New.

  2. Name the tag. Mau’s example uses Jebbit Embedded Experience.

  3. Under Tag Configuration, choose Custom HTML.

  4. Paste in the iframe embed code.

  5. Under Triggering, choose Page View – Some Pages.

  6. Define the trigger condition for the page where the Experience should appear, for example:
    Page Path contains /product-quiz

  7. Save the tag.

After saving the tag, test in Preview mode to make sure the embedded Experience loads properly.


Track Experience completion

There are two common ways to track completion for an embedded Experience:

  • Option A: redirect-based completion tracking

  • Option B: on-page completion tracking without a redirect

Option A: Track completion with a redirect

Use this option when the final screen redirects participants to a thank-you page.

  1. In the Experience, open the Final Screen redirect settings.

  2. Set a unique thank-you URL, for example:

/quiz-thank-you
  1. In GTM, create a new trigger:

    • Type: Page View

    • Condition: Page Path equals /quiz-thank-you

  2. Create the conversion tag you want to fire, such as:

    • Google Ads Conversion Tracking

    • Meta Pixel

  3. Enter the required conversion ID or pixel ID.

  4. Set the trigger to the thank-you page trigger you created above.

When configured this way, the pixel fires when the participant completes the Experience and lands on the thank-you page.

Option B: Track completion on the same page

Use this option when the Experience completes on-page without redirecting.

In this setup, you add JavaScript to the same Custom HTML tag used for the embed so the page listens for a completion message and pushes an event to the dataLayer. Mau’s draft specifically includes the following example and notes that the iframe should be wrapped in a <div> before adding the script

<div id="experience-embed">   <!-- paste your iframe embed code here -->   <iframe src="https://experience.jebbit.com/your-experience-id" width="100%" height="600px"></iframe> </div>  <script>   window.addEventListener("message", function(event) {     if (event.data === "jebbitExperienceComplete") {       window.dataLayer = window.dataLayer || [];       dataLayer.push({ event: "jebbitComplete" });     }   }); </script>

Note: Work with your BlueConic CSM to confirm your quiz is configured to send jebbitExperienceComplete as a postMessage on completion. If it’s not, this script won’t work.

  1. Go to Triggers > New.

  2. Choose Custom Event.

  3. Set the Event Name to jebbitComplete.

  4. Use All Custom Events as the trigger type.

Then create the pixel tag:

  1. Go to Tags > New.

  2. Choose the tag type you want to fire, such as:

    • Google Ads

    • Meta Pixel

    • GA4 Event

  3. Set the trigger to jebbitComplete.

With this setup, the GTM tag can fire when the embedded Experience completes without requiring a page redirect.


Add optional event metadata

If you want to enrich the event sent to GTM, you can push additional metadata into the dataLayer. Mau’s draft gives the following example:

dataLayer.push({   event: "jebbitComplete",   quizName: "Fall Style Quiz",   quizCategory: "Product Discovery",   quizOutcome: "Winter Jacket" });

You can then use GTM variables to pass these values into GA4 or other tools


Test the setup

Before launch:

  1. Open Preview Mode in GTM.

  2. Navigate to the page where the Experience is embedded.

  3. Complete the Experience.

  4. Verify that:

    • the pixel or tag fires on the thank-you page for Option A, or after postMessage for Option B

    • the data is visible in the GTM debug console or Tag Assistant tools


Best practices

  • Use a unique thank-you page when you want the simplest completion trigger

  • Keep event names consistent across Experiences

  • Add metadata only when it supports reporting or downstream activation needs

  • Test the embed and the tag firing before publishing changes

  • If your embedded Experience structure is similar across campaigns, you can reuse the tracking tag and update the trigger conditions, such as the URL path or event name

Tip: If your Jebbit experience structure is similar across campaigns, you can recycle the tracking tag—just update the trigger conditions (like URL path or event name).

Did this answer your question?