Skip to content

Analytics

Introduction

Analytics is implemented by using GTM (Google Tag Manager). Parameters are pushed to a Data Layer object used by GTM, some parameters are always available and others only at certain steps in Tulo Shop Events are pushed to the Data Layer when the end user navigates and e.g. proceeds with the purchase, step by step

Data Layer object

The Data Layer object contains the following information, 4 top level properties as objects. These can be accessed in GTM using Data Layer Variables.

Top level properties

Properties Explanation
general General information about the shop, organisation, title in Payway, certain step/page etc
product Product beeing shown/purchased. Available when user has selected a campaign or package for purchase
account Account information from Payway. Available when the user is logged in.
order Order information. Available when a purchase is completed or has failed, general.pageCategory=confirmation.

Data Layer, initial data after page load from server side

dataLayer = [
    {
        "general": {
            "pageName": "MARKETPLACE",
            "pageUrl": "some-group-key/some-marketplace-key", // the path to the shop (group and marketplace keys in Payway)
            "pageCategory": "marketplace", // see possible values below!
            "organisation": "", // organisation id, same as in Payway

            // The following parameters are received as query parameters in the original url to the shop                
            "title": "", // from tc/accountOrigin query parameter, see query parameter note below!
            "accountOrigin": "",
            "returnUrl": "",
            "articleId": "",
            "paywallId": ""
        },
        "product": {
            "productCode": "",
            "productName": "",
            "isCampaign": true | false,
            "tags": [],
            "title": ""
        },
        "account": {
            "accountId": "",
            "zipCode": "",
            "city": ""
        },
        "order": {
            // The following parameters are received as query parameters in the original url to the shop
            // see query parameter note below!
            "trafficSource": "",
            "merchantReference": ""
        }
    }
];

Query Parameters

More information about supported query parameters, see here

Data Layer, additional data added after steps are completed

general

these are updated when a package/campaign has been selected/is browsed

{
    "title": ""
}

product

these are updated when a package/campaign has been selected/is browsed

{
    "productCode": "",
    "productName": "",
    "isCampaign": true | false,
    "tags": [],
    "title": "" // package/campaign title code in Payway
}

account

if the customer is logged in, accountId is set. If the customers address is saved in Payway, the zipCode and city parameters will be set

    {
        "accountId": "",
        "zipCode": "",
        "city": ""
    }

order

    {
        "orderId": "", // Payway order id, e.g. ORGANISATION-12345
        "price": number, // Price paid for the first period
        "period": { "length": number, "type": "day | week | month | year" },
        "paymentMethod": "", // Purchased with payment method, e.g. adyen_scheme. See Payway docs!
        "subscriptionType": "limited | recurring",
        "status": "complete | failed | pending | ?",
        // optional
        "paywallId": "", // from query parameter "pid" in the original url when navigating to Tulo Shop
        "trustedIdentity": true | false, // if TrustedIdentity was used to complete the order, invoice for Finnish customers only!?
        // always set on initial page load (available before order is completed/failed)
        "trafficSource": "", // from query parameter...
        "merchantReference": "" // from query parameter...
    }

general.pageName (possible values)

pageName Description
MARKETPLACE Where several packages are presented, "entry page" from Payway admin link
MARKETPLACE_SHOP When a campaign/package has been chosen
MARKETPLACE_SHOP_CONFIRMATION When a purchase has been completed or has failed

general.pageCategory (possible values)

pageCategory Description
marketplace Where several packages are presented, "entry page" from Payway admin link
shop When a campaign/package has been chosen (awaits that product info has loaded and customer is possibly logged in, see note below!)
shop_step*_complete Purchase wizard, step * has been completed (* = 1-3)
shop When a campaign/package has been chosen
shop_requestpasswordreset When at the reset password request page
shop_completepasswordreset When at the complete password request page
confirmation When a purchase has been completed or has failed