Overview
Tracking page views on regular websites are relatively straightforward. You add a tracking code to every page. Every time a visitor clicks an internal link, a browser window refreshes, and a new page view hit is sent to Google Tag Manager (GTM).
The Jumbo Lottery Platform website makes use of a single-page application (SPA). SPA is a website design approach where each new page’s content is served not from loading new HTML pages but generated dynamically through JavaScript’s ability to manipulate the DOM elements on the existing page itself.
In a more traditional web page architecture, an initial page might link to other HTML pages on the server that the browser will download and display from scratch.
A SPA approach allows the user to continue consuming and interacting with the website. At the same time, new elements and content can be updated or fetched. This can result in a much faster interaction with the user and all-round better user experience.
This architecture approach requires that we make some changes to the way we set up GTM Triggers.
If you are migrating an existing GTM account, we recommend you set up new Triggers instead of trying to edit older ones. We also recommend you group all Triggers relying to Powered by Jumbo in a single folder.
Triggers
This section aims to provide a guide to setting up the most common Triggers you will need to fire off your Tags for tracking user activity and campaign conversion. In GTM, a trigger listens to PBJ for certain types of events like registration, purchase, or page history changes. The trigger tells the tag to fire when the specified event is detected.
All Pages Load
This event will fire when the first-page view is being recorded, or when the refresh button is clicked. It will fire no matter what page the first-page view is recorded on. This trigger can often be confused with the Browser History trigger that fires on every subsequent URL change.
This event is usefully for capturing referral traffic.
Browser History
To fire a tag whenever the URL changes, you need to listen to the browser history changing. This trigger won’t fire on initial page load, you will need to make use of the
All Pages Load
trigger for the initial load.
This trigger closer represents the traditional page view trigger and is useful for triggering tags on-page changes.
New Customer Signup
Trigger fired whenever a customer creates an account SignUp
.
{
customerID: "ZFC3-BYPP-SMFT-CBZE",
event: "SignUp",
gtm.uniqueEventId: 1646,
}
Customer Login
Trigger fired whenever a customer logs in Login
{
customerID: "ZFC3-BYPP-SMFT-CBZE",
event: "Login",
gtm.uniqueEventId: 1646,
}
Purchase
Trigger fired whenever a customer makes a purchase.
If you are conducting marketing programs that are based on a sale conversion, this Trigger will be the one to use.
{
Purchase: "Complete",
event: "Transaction",
gtm.uniqueEventId: 237,
transactionCurrency: "AUD",
customerID: "ZFC3-BYPP-SMFT-CBZE",
transactionId: "ZYHW-QGEK-TVVZ-KF3Y",
transactionProducts: [{
category: "Unite Home Lottery",
draw: 1234,
name: "4 Ticket Book",
price: "30.00",
quantity: 1,
sku: "2000004-1000171"
}],
transactionTotal: "30.00",
}
First Purchase
Trigger fired on the customers first purchase.
If you are conducting marketing programs that are based on a first sale conversion only, this Trigger will be the one to use.
{
Label: "ZYHW-QGEK-TVVZ-KF3Y",
Purchase: "Complete",
event: "FirstSale",
gtm.uniqueEventId: 243,
transactionCurrency: "AUD",
customerID: "ZFC3-BYPP-SMFT-CBZE",
transactionId: "ZYHW-QGEK-TVVZ-KF3Y",
transactionProducts: [{
category: "Unite Home Lottery",
draw: 1234,
name: "4 Ticket Book",
price: "30.00",
quantity: 1,
sku: "2000004-1000171",
}],
transactionTotal: "30.00",
}
Customer Feedback
Triggered whenever a customer leaves feedback.
{
event: "Feedback",
gtm.uniqueEventId: 478,
rating: "satisfied",
value: 1,
}
Subscription
Triggers whenever a customer selects an AutoPlay or other subscription on the purchase flow.
Deposit
Triggers after a customer deposit funds into there wallet.
{
customerId: "ZFC3-BYPP-SMFT-CBZE",
depositId: "BYSP-42AAP-1QQA-90N0",
event: "Deposit",
gtm.uniqueEventId: 236,
value: "30",
}
Page Click
Triggered whenever a customer clicks on the site.
Variables
This section aims to provide a guide to setting up the most common variable. A variable is a named placeholder for a value can be added to a tag, such as a product name, a price value, or a date. In addition to the built-in variable, Powered by Jumbo updates a number of variables on the data layer to temporarily hold values so that they can be used by Tags, triggers, and Variables.
Customer ID
Contains the ID of the customer currently interacting with the site when knows. Before a SignUp or Login event, it will be null.
Example: customerID: "ZFC3-BYPP-SMFT-CBZE"
Transaction Id
The Id of the system id representing the transaction.
Example transactionId: "ZYHW-QGEK-TVVZ-KF3Y"
Transaction Products
An array of lotteries purchased as part of this transaction.
Example:
transactionProducts: [{
category: "Unite Home Lottery",
draw: 1234,
name: "4 Ticket Book".
price: "30.00",
quantity: 2,
sku: "2000004-1000171"
}]
Transaction Total
The total value of the transaction.
Example: transactionTotal: "30.00"
Customer Feedback Rating
The value the customer set as part of giving feedback. not_satisfied
, neutral
, not_satisfied
Value: -1
, 0
, 1