Skip to main content

Embed and track BlueConic Experiences in GA4

BlueConic Experiences allows you to engage consumers with interactive content directly on your website. By embedding an Experience and connecting it to Google Analytics 4 (GA4), you can track key events such as completions and conversions.

This setup helps you measure performance, optimize engagement, and build audiences based on user behavior. It assumes you use Google Tag Manager (GTM) to manage tracking.


Before you begin

Before embedding and tracking your Experience, ensure you have:

  • Access to your BlueConic Experience

  • Permissions to publish and embed content

  • A Google Tag Manager account set up on your website

  • A GA4 configuration tag already created in GTM

  • Defined how your Experience completes:

    • Redirect to a thank-you page, or

    • Completion on the same page


Embed the BlueConic Experience

Copy the embed code

  1. Navigate to the Experience you want to embed.

  2. Select Publish > Embed.

  3. Choose the Embedded format.

  4. Copy the iframe embed code.

Add the Experience to your website

You can embed the Experience using your CMS or Google Tag Manager.

Option A: Add to HTML (CMS or site builder)

  • Paste the embed code directly into the page where you want the Experience to appear.

Option B: Add via Google Tag Manager (recommended)

  1. In GTM, go to Tags > New.

  2. Select Custom HTML.

  3. Paste the iframe embed code.

  4. Add a trigger for the page(s) where the Experience should appear (for example: Page Path contains /quiz).

  5. Save and publish.


Track completions in GA4

Choose a tracking method based on how the Experience ends:


Track via redirect (thank-you page)

Use this method when the Experience redirects users after completion.

Configure the redirect

  1. Open the Final Screen of your Experience.

  2. Select Redirect as the action.

  3. Enter a unique thank-you URL (for example: /quiz-thank-you).

Create a GA4 event tag in GTM

  1. In GTM, go to Tags > New.

  2. Select Google Analytics: GA4 Event.

  3. Choose your GA4 configuration tag.

  4. Enter the event name: quiz_complete.

  5. Under Triggering, select:

    • Page View → Page Path equals /quiz-thank-you

  6. Save and publish.

This setup fires a quiz_complete event in GA4 when a user lands on the thank-you page.

Track on-page completion (no redirect)

Use this method when the Experience completes on the same page.

  • Update the embed code

  • Wrap your embed code with a JavaScript listener:

<iframe
src="https://experience.blueconic.com/your-experience-id"
width="100%" height="600px"
frameborder="0"
></iframe>

<script>
window.addEventListener("message", function(event) {
if (event.data === "experienceComplete") {
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: "experienceComplete",
experienceName: "Holiday Gift Finder"
});
}
});
</script>

Note: Coordinate with your BlueConic CSM to enable the experienceComplete postMessage for your Experience.


Create a GA4 event tag in GTM

  1. Go to Tags > New.

  2. Select Google Analytics: GA4 Event.

  3. Choose your GA4 configuration tag.

  4. Set the event name: experience_complete.

Add parameters:

  • experience_name = {{experienceName}}
    (Create a Data Layer Variable named experienceName)

Set the trigger:

  • Trigger type: Custom Event

  • Event name: experienceComplete

Save and publish.

This setup tracks completions without requiring a redirect.


Verify tracking in GA4

  1. Go to Google Analytics > Admin > DebugView.

  2. Open your website in a live tab.

  3. Complete the Experience.

  4. Confirm the event appears:

    • experience_complete or quiz_complete

When the event appears in DebugView, tracking is working correctly.


Next steps

  • Create custom dimensions in GA4 for:

    • Experience name

    • Outcomes

    • UTM parameters

  • Build audiences in GA4 using completion events for remarketing.

  • Add additional engagement tracking (such as clicks or time spent) using more postMessage events.


FAQ

When should you use on-page tracking?

  • Use it when the Experience completes without leaving the page.

What should you do if events do not appear in GA4?

  • Check your GTM triggers and ensure the correct event names are used

  • Confirm the dataLayer is receiving events

  • Use DebugView to validate real-time tracking

Can you track more than completions?

  • Yes, you can track engagement events such as clicks or progress using additional postMessage events

Did this answer your question?