Google Tag Manager Triggers

    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.

    Screen-Shot-2020-09-18-at-10.51.20-am.png

    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.

    Screen-Shot-2020-09-18-at-1.13.21-pm.png

    New Customer Signup

    Trigger fired whenever a customer creates an account SignUp.

    {
        customerID: "ZFC3-BYPP-SMFT-CBZE",
        event: "SignUp",
        gtm.uniqueEventId: 1646,
    }

    Screen-Shot-2020-09-18-at-10.42.02-am (1).png

    Customer Login

    Trigger fired whenever a customer logs in Login

    {
        customerID: "ZFC3-BYPP-SMFT-CBZE",
        event: "Login",
        gtm.uniqueEventId: 1646,
    }

    Screen-Shot-2020-09-18-at-10.44.00-am.png

    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",
    }

    Screen-Shot-2020-09-18-at-10.44.34-am (2).png

    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",
    }

    Screen-Shot-2020-09-18-at-10.45.15-am (1).png

    Customer Feedback

    Triggered whenever a customer leaves feedback.

    {
        event: "Feedback",
        gtm.uniqueEventId: 478,
        rating: "satisfied",
        value: 1,
    }

    Screen-Shot-2020-09-18-at-10.45.46-am.png

    Subscription

    Triggers whenever a customer selects an AutoPlay or other subscription on the purchase flow.

    Screen-Shot-2020-09-18-at-10.48.24-am.png

    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",
    }

    Screen-Shot-2020-09-18-at-2.23.14-pm.png

    Page Click

    Triggered whenever a customer clicks on the site.

    Screen-Shot-2020-09-18-at-10.51.47-am.png

    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"

    Screen-Shot-2020-09-18-at-11.14.06-am.png

    Transaction Id

    The Id of the system id representing the transaction.

    Example transactionId: "ZYHW-QGEK-TVVZ-KF3Y"

    Screen-Shot-2020-09-18-at-11.17.59-am.png

    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"
    }]

    Screen-Shot-2020-09-18-at-11.18.46-am.png

    Transaction Total

    The total value of the transaction.

    Example: transactionTotal: "30.00"

    Screen-Shot-2020-09-18-at-11.15.16-am.png

    Customer Feedback Rating

    The value the customer set as part of giving feedback. not_satisfiedneutralnot_satisfied

    Value: -101

    Screen-Shot-2020-09-18-at-11.16.58-am.png

    Was this article helpful?
    0 out of 0 found this helpful