Example: Data Layer
    • 1 Minute to read
    • Dark
      Light

    Example: Data Layer

    • Dark
      Light

     

    Shopware 5 is no longer supported. Please use Shopware 6 instead.

    Article summary

    The following example contains one page per type with the respective set values. These values are automatically written to a Tag Integration Data Layer. You can then create these values as parameters in Tag Integration and assign them to the Tracking Plugin.

    Example data layer on a product detail page

    window._ti = {
    	"pageLanguage": "en", 
    	"productId": "SW10159",
    	"productName": "YORK 3",
    	"productPrice": "599",
    	"productQuantity": "1",
    	"currency": "EUR",
    	"productStatus": "view",
    	"instock": "12",
    	"isAvailable": "1",
    	"currency": "EUR",
    	"productCat_1_1": "Craft & Tradition",
    	"productCat_1_2": "Men",
    	"productCat_1_3": "Business bags",
    	"productCat_Canonical_1": "Craft & Tradition",
    	"productCat_Canonical_2": "Men",
    	"productCat_Canonical_3": "Business bags",
    	"pageType": "Product details",
    	"pageId": "en.craft & tradition.men.sw10159"
    };

    Page

    Tag Integration Data Layer

    Example

    Fix*

    Dynamic*

    Category pages




    pageId

    en.adventure.equipment

    (error)

    (tick)

    pageType

    Category page

    (tick)

    (error)

    pageCat_1

    Adventure

    (error)

    (tick)

    pageCat_2

    Equipment

    (error)

    (tick)

    Shopping cart page

    pageId

    en.checkout.cart

    (error)

    (tick)


    pageType

    Buying process

    (tick)

    (error)

    Product view













    pageId

    en.adventure.equipment.snowboard.sw100391

    (error)

    (tick)

    pageType

    Product details

    (tick)

    (error)

    productId

    SW10039.1

    (error)

    (tick)

    productName

    Pocket knife

    (error)

    (tick)

    productCat_1_1

    Adventure

    (error)

    (tick)

    productCat_1_2

    Equipment

    (error)

    (tick)

    productCat_1_3

    Snowboard

    (error)

    (tick)

    productPrice

    399

    (error)

    (tick)

    productQuantity

    1

    (error)

    (tick)

    productStatus

    view

    (tick)

    (error)

    currency

    EUR

    (error)

    (tick)

    instock

    12

    (error)

    (tick)

    isAvailable

    1

    (error)

    (tick)

    Add to shopping cart













    pageId

    en.adventure.equipment.snowboard.sw100391

    (error)

    (tick)

    pageType

    Product details

    (tick)

    (error)

    productId

    SW10039.1

    (error)

    (tick)

    productName

    Pocket knife

    (error)

    (tick)

    productCat_1_1

    Adventure

    (error)

    (tick)

    productCat_1_2

    Equipment

    (error)

    (tick)

    productCat_1_3

    Snowboard

    (error)

    (tick)

    productPrice

    399

    (error)

    (tick)

    productQuantity

    1

    (error)

    (tick)

    productStatus

    add

    (tick)

    (error)

    currency

    EUR

    (error)

    (tick)

    instock

    12

    (error)

    (tick)

    isAvailable

    1

    (error)

    (tick)

    Order confirmation page












    pageId

    en.checkout.finish

    (tick)

    (error)

    pageType

    Buying process

    (tick)

    (error)

    orderId

    20001

    (error)

    (tick)

    orderValue

    14.90

    (error)

    (tick)

    productId

    SW10120;SW10119

    (error)

    (tick)

    productName

    product 1;product 2

    (error)

    (tick)

    productQuantity

    1;1

    (error)

    (tick)

    productPrice

    6;5

    (error)

    (tick)

    currency

    EUR

    (error)

    (tick)

    paymentName

    Mastercard

    (error)

    (tick)

    deliveryName

    Standard service

    (error)

    (tick)

    productStatus

    conf

    (tick)

    (error)

    Login page

    pageId

    en.login

    (tick)

    (error)

    pageType

    Account

    (tick)

    (error)

    Account area

    pageId

    en.login.overview

    (tick)

    (error)

    pageType

    Account

    (tick)

    (error)

    Internal search




    pageId

    en.search

    (tick)

    (error)

    pageType

    Search page

    (tick)

    (error)

    internalSearch

    snowboard

    (error)

    (tick)

    numberSearchResults

    24

    (error)

    (tick)

    Information page

    pageId

    en.aboutus

    (error)

    (tick)

    pageType

    Editorial content

    (tick)

    (error)

    Logged in user

    userId

    ef8ca1c0ff7d2e34dc0953d4222655b8

    (error)

    (tick)

    isLoggedIn

    1

    (error)

    (tick)

    *In the column "Fix" all parameters are marked which are consistent of the same value. The value is always passed in English. For all marked parameters under "Dynamic", the transferred value is determined dynamically.


    Was this article helpful?