(Last Updated 4/17/25)
When using the PromoTix embedded checkout widget, the ticket buying process is embedded on your own website inside of an iFrame.
This guide explains how you can capture dynamic purchase events triggered inside the PromoTix embedded checkout widget and send them to Google Tag Manager installed on your own website.
By following these instructions, you can pass real purchase data (such as order amount, transaction ID, currency, etc.) to third-party platforms such as Meta, Google Ads, The Trade Desk, and more.
Add your Google Tag Manager container on the domain where your PromoTix embedded checkout widget is located.
Verify that it is working by opening the website in GTM Preview Mode.
Inside your parent Google Tag Manager container, create a new custom HTML tag:
<script>
window.addEventListener("message", function (event) {
if (event.data && event.data.event === "order_success") {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "order_success",
transaction_id: event.data.transaction_id,
revenue: event.data.revenue,
currency: event.data.currency
});
}
});
</script>
This tag listens for the postMessage sent from the PromoTix embedded checkout widget iFrame and pushes a clean event into the parent dataLayer:
Create a custom event trigger that will fire any tag when the order_success is pushed by the listener:
Create a third-party tracking tag (Meta, Google Ads, The Trade Desk, etc.) and use the trigger you created in step 3.
Create the following Data Layer Variables in Google Tag Manager to pass dynamic values into your third-party tags:
Variable Name |
Data Layer Variable Name |
dlv_transaction_id |
transaction_id |
dlv_revenue |
revenue |
dlv_currency |
currency |