On July 1, 2023, Google replaced Universal Analytics with Google Analytics 4, their next-generation measurement solution.
β
Read and follow all the steps below to successfully link Google Tag Manager to an Access Tonic event.
Event Tracking
The ticket widget and checkout make use of the Analytics e-commerce metrics. Through this, your Analytics conversions will come as a 'purchase' event.
β
Access Tonic will also send the following events:
Event | Source | Description |
view_item_list | Ticket Widget | Viewing ticket types for an event |
add_to_cart | Ticket Widget | Selecting a ticket type |
begin_checkout | Checkout | On entering the Checkout |
purchase | Checkout | On completing a ticket purchase |
Implement GTM codes in Access Tonic
From your Access Tonic dashboard, click Manage for the applicable event.
Go to the Sales Tracking tab.
Go to the Google Tag Manager tab.
In the Configure box enter your Google Tag Manager ID, then click Save.
Setting up Google Tag Manager
To send your data through from Google Tag Manager to Google Analytics you will need to configure your Tag to send event triggers. To do this, follow the steps for Google Tag Manager under "Collect ecommerce Data" in this Set up ecommerce events guide from Google.
β οΈ Important: Remember to tick 'Send e-commerce data'.
Custom booking tracking
If you have your own custom process, Access Tonic makes it easier to capture the purchase data and pass it down to your third party analytics software.
Access Tonic Checkout sends the purchase data using window.postMessage() functionality which can be captured using a JavaScript event listener.
// Example of capturing the payload sent by Tonic Checkout
window.addEventListener('message', function (event) {
if (event.origin === 'https://ticketing.designmynight.com') {
const { data } = event;
if (data && data.event === 'dmn_begin_checkout') {
// Implement your custom tracking for begin checkout event
myCustomTrackingBeginCheckoutEvent(data.payload)
}
if (data && data.event === 'dmn_purchase') {
// Implement your custom tracking for purchase completed event
myCustomTrackingPurchaseEvent(data.payload)
}
}
});
Tonic Checkout sends an object with the following data:
{
event: 'dmn_begin_checkout' when the purchase flow starts, or 'dmn_purchase' when the purchase was completed,
payload: EcommerceData,
}
The EcommerceData object has the following structure:
{
transaction_id: Purchase ID (string),
value: 20,
currency: 'GBP' or 'AUD',
tax: 4,
coupon: "coupon-code" (optional),
items: [{
item_id: {EventID}_{TicketTypeId},
item_name: {TicketTypeName},
price: 10,
quantity: 2,
item_brand: {EventName},
item_category: "Access Tonic"
}]
}
π€ Tip: Please see this Measure Ecommerce guide from Google for more information.
βGoogle Tag cross-domain tracking
The following steps for cross-domain tracking must also be completed.
Ensure Google Tag Manager has been installed on your site as described in the Google Tag Documentation and the codes have been implemented into the Access Tonic event admin.
Allow your Google Tag to run on our designmynight.com domain from your Analytics admin.
Tip: Please see Google's guide on Set up cross-domain measurement via the Admin | Google Analytics Help.
Your domains should look similar to our example below:
β
β
