Skip to main content

Connect Google Tag Manager

Load your Tag Manager container in your ticket store and use the events of every sale in your own tags.

Do you work with Google Tag Manager? Then EventSquare loads your container in your ticket store and during checkout, and you get the steps of every sale in the data layer. With those, you set up the tags for Google Analytics, Google Ads, Meta and other tools in your own container.

Is your ticket store embedded in your website? Then this integration doesn't work in the store. Your own website, with your own container, tracks the sales. Read Tracking with an embedded ticket store. The steps in your container (from "Set up your container") are the same, though.

Set it up in EventSquare

  1. Open your event and go to Settings › Integrations.

  2. On Google Tag Manager, click Install (or Settings if you set it up before), enter your container ID under Tag ID (starts with GTM-) and click Save.

  3. The integration is now on. Use the switch on the card to turn it off or on again.

What not to activate

  • Google Analytics: do not activate the Google Analytics integration in EventSquare if you track Google Analytics through your container. Otherwise every sale counts twice.

  • Meta Pixel: we recommend the Meta Pixel integration in EventSquare, with a Conversions API access token. It also sends every purchase directly from our servers to Meta, which Tag Manager can't do. In that case, do not also load the same pixel in your container. See Set up Meta Pixel & Conversions API.

  • TikTok Pixel: use the TikTok Pixel integration in EventSquare, or load the pixel in your container. Not both.

The events in the data layer

EventSquare puts these events in the data layer, in the format of the Google Analytics 4 ecommerce events:

Event

When

add_to_cart

Tickets added to the cart.

remove_from_cart

Tickets removed from the cart.

begin_checkout

Checkout has started.

purchase

The order is completed.

The fields you use in your tags:

Data Layer Variable

What

Example

ecommerce.value

The amount of the change, the cart or the order, including service fees.

50.5

ecommerce.currency

The currency.

EUR

ecommerce.transaction_id

The order reference (only with purchase).

HRG66616

ecommerce.items

The tickets and products.

eventsquare.event_id

ID for Meta, to avoid counting twice (only with purchase).

123456789012

eventsquare.edition.name

The name of the edition.

2027

The data layer contains no personal data of your buyers.

Set up your container

Step 1: variables

Go to Variables › User-Defined Variables › New › Data Layer Variable, and create one per field:

  • ecommerce.value, name it DLV - value

  • ecommerce.currency, name it DLV - currency

  • ecommerce.transaction_id, name it DLV - transaction_id

  • eventsquare.event_id, name it DLV - event_id

Step 2: triggers

  • All steps: Triggers › New › Custom Event. Event name: add_to_cart|remove_from_cart|begin_checkout|purchase, and check Use regex matching.

  • Purchases only: a second Custom Event trigger with event name purchase.

Step 3: Google Analytics 4

  1. Tags › New › Google Analytics: GA4 Event.

  2. Measurement ID: your G- ID.

  3. Event Name: {{Event}} (the built-in variable Event).

  4. More Settings › Ecommerce › check Send Ecommerce data, with Data source: Data Layer.

  5. Triggering: the "All steps" trigger.

Your container also needs a Google tag for the same G- ID that fires on all pages.

Step 4: Google Ads conversion

  1. Tags › New › Google Ads Conversion Tracking, with your Conversion ID and Conversion Label from Google Ads.

  2. Conversion Value: {{DLV - value}}

  3. Transaction ID: {{DLV - transaction_id}}

  4. Currency Code: {{DLV - currency}}

  5. Triggering: the "Purchases only" trigger.

Without a conversion value, Google Ads only counts the number of sales, not your revenue. With the transaction ID, Google Ads counts an order only once.

Step 5: Meta Pixel (only if you don't use the integration in EventSquare)

Create a tag with your Meta pixel (a template from the Community Template Gallery or Custom HTML) with the standard event Purchase, the value {{DLV - value}}, the currency {{DLV - currency}} and as event ID {{DLV - event_id}}. Triggering: "Purchases only". With Custom HTML:

<script>
fbq('track', 'Purchase',
{ value: {{DLV - value}}, currency: {{DLV - currency}} },
{ eventID: {{DLV - event_id}} }
);
</script>

Use the standard event Purchase, not a name of your own: Meta optimizes your ads for Purchase.

Other tools

LinkedIn, Xandr, The Trade Desk or another tool? Fire their conversion tag on the "Purchases only" trigger, and pass on {{DLV - value}}, {{DLV - currency}} and {{DLV - transaction_id}} where possible.

Test it

  1. In your container, click Preview and enter the address of your ticket store.

  2. Put a ticket in your cart: add_to_cart appears in Tag Assistant. Click it to see the data layer and the tags that fired.

  3. Go to the checkout: Tag Assistant follows to checkout.eventsquare.io and shows begin_checkout.

  4. Complete an order (a free ticket will do) to see purchase and your conversion tags.

Is everything working? Then click Submit in your container to publish your changes.

Did this answer your question?