Help center

Learn how to sell online with Checkout Page

Track events from embed & pop-up checkouts using your site’s Google Tag Manager

Track events from embed & pop-up checkouts using your site’s Google Tag Manager

In this help article, you will learn how to set up event tracking for your embed & pop-up Checkout Page checkouts using your site's Google Tag Manager.

You can easily track events from your one-page checkouts.

If you don’t want to add your Google Analytics or Google Tag Manager script to your checkouts, and instead want to pass the events on to your site’s Google Tag Manager instance, you can simply add a script to your website.

Step 1: Add a script to your website

This script allows you to listen to the events tracked by Checkout Page and push those events to your Google Tag Manager instance.

Checkout Page will automatically track two custom events:

  • enter - whenever someone enters your checkout
  • checkout - whenever someone completes your checkout

You can see the events categorized under the event name: checkoutpage-{{checkoutId}}.

Each of the checkout events will also contain:

  • value - the final purchase amount
  • checkoutID - the ID of your checkout
  • currency - the currency of your checkout
  • orderId - the ID of your customer’s order

You can add the following script to your site, or you can add it as a Custom HTML tag in Google Tag Manager:

<script type="text/javascript">
 window.addEventListener("message", function (event) {

   // check if event is from Checkout Page
   if ( && === "checkoutpage.event") {

     // track checkout event
     if ( === "checkout") {

     // track other events
     if ( !== "checkout") {

Step 2: Add a trigger to track Checkout Page events in Google Analytics

You also need to create a trigger to ensure your Google Analytics tag tracks your Checkout Page events.

Here’s how to do it:

  1. Open your Google Tag Manager dashboard and click on your container

  1. Under the Workspace tab, go to Triggers from the left-hand menu to add a new trigger by clicking on New

  1. Click on Trigger configuration and choose Custom event as the trigger type


  1. Now you have two options for the Event name:
  • Set Event name to checkoutpage-* to track all Checkout Page events and turn on Use regex matching

  • Set Event name to checkoutpage-checkout to only track conversion event

  1. Once you’ve entered your preference, name your trigger as Checkout Page Events and click Save to go to the next step

Step 3: Add an Event tag to report event data to Google Analytics

Once you’ve set up all your events and triggers, it is important to add a Google Analytics Event tag that reports all the collected data back to you.

  1. Open your Google Tag Manager dashboard and click on your container

  1. Under the Workspace tab, go to Tags from the left-hand menu to add a new tag by clicking on New

  1. Click on Tag configuration to choose Google Analytics: GA4 Event as the tag type

  1. Choose None – Manually Set ID and type {{Event}} as the Event name

  1. Open your Google Analytics dashboard and go to Admin from the left-hand menu

  1. Select Data streams and click on your data stream

  1. Copy the Measurement ID

  1. Paste it into the Measurement ID field on Google Tag Manager

  1. Scroll down to click on Triggering to choose the trigger (Checkout Page Events) you created in Step 4

  1. Finally, Save your tag and that’s it!

Most importantly, remember to test your tag to make sure that all data is tracked and monitored correctly on your Google Analytics account.

Take a look at these articles to learn more about Google Analytics and Google Tag Manager:

Have a question about
Checkout Page?

Start selling in minutes with our no-code checkout page builder.

Create branded, custom checkout pages and increase revenue with one-click upsells and order bumps.

Whether on your website or in your sales funnel, our simple checkout process boosts sales.

2024 © Checkout Page LLC. All rights reserved.