Tracking conversion with Google Tag Manager
Accessing session variables available on confirmation page via GTM
When a user reaches the confirmation page of the TTG Encre White Label a number of data points are available in the browser session. These can be accessed using a user defined Javascript variable in Google Tag Manager
Confirmation Page URL Format
The confirmation page uses the following URL format:
https://<domain>/checkout/order-confirmation?reference=<order reference>
This can be used as part of a history change trigger in Google Tag Manager, with a pagePath value that contains: /checkout/order-confirmation
Session Object
The session object is called checkout details
and contains the following values in a JSON format.
Key | Description | Type | Example |
---|---|---|---|
bookingReference | TTG booking reference | String | TTG50165909 |
String | The currency of the transaction | String | GBP |
Users email address | String | [email protected] | |
isFirstOrder | If this is identified as a first purchase for this user | Boolean | true |
paymentId | Internal reference for the payment | String | cc37cd1b-21f7-4e91-afff-000000000000 |
total | Total value of order | Number | 262 |
Updated 2 months ago