As mentioned before, the data layer builds the bridge between your website and Mapp Intelligence. The first implementation step is to place the data layer within the <head> section of each page on your publisher website. This chapter contains a detailed description of the data layers to be implemented.

In the example provided here, we use Mapp's own Tag Management solution. The integration of Mapp Intelligence tracking tags is possible with other Tag Management tools, for example Google Tag Manager (GTM). Just create the relevant data layers as needed. In GTM, the data layer is a combination of events and variables.

Basic Data Layer

The following data layer is required to track each page.

Example

window._ti['pageType'] = 'Article';
window._ti['contentCategory'] = 'Feuilleton';
window._ti['contentSubcategory'] = 'Landing page';
window._ti['emailOptIn'] = 'yes';
window._ti['customerId'] = '<encrypted e-mail address of the user>';
JS
Data Layer VariableDescription
window._ti['pageType']

Contains the flag for different types of pages. Example values:

  • Article
  • News
  • Event
  • Video
  • Gallery

Please include the word 'article' in the page type value of all pages that contain an article or a post.
window._ti['contentCategory']

Contains the main content category to categorize your pages. Example values:

  • Home
  • Politics
  • Economy
  • Feuilleton
window._ti['contentSubcategory']

Contains the subordinate content category to categorize your pages. Example values:

  • Corporate
  • Career
  • Customer service
  • Tools
  • Product overview
  • Product detail
  • Internal search
  • Landing page
  • Blog
  • Info
  • Knowledge
window._ti['emailOptIn']

Indicates whether a user has decided to receive e-mail. It is user-related status information that can be tracked, for example when a user logs in or via a cookie. Possible values:

  • 1 = yes
  • 2 = no (default)
  • 3 = unknown

The default value is 'no'. The value needs to be set to 'yes' if a user has opted in to receive e-mail information.

window._ti['customerId']
The encrypted e-mail of the user. Must be SHA256 hash encoded.

Data Layer for Special Page Type Pages

Implement the following Data Layer on all relevant pages to assign a value to different page types and to get a quick overview of the page performance. Relevant are all pages with user interactions that you consider important for your performance evaluation. Typically this includes home pages, category pages, content pages and – if available – shop pages. Excluded are pages such as the legal notice or contact page.
The score value itself defines the relevance of the page for performance evaluation. The more important an interaction with this particular page (type) is the higher the value. Example: Your article pages get the value 10, a page within a gallery only 2 and the home page a 15. Define the different scores according to your needs. If you want to flag every page of your website, feel free to implement the Data Layer on all pages.

Example

window._ti['pageEngagement'] = '20';
JS
Data Layer VariableDescription
window._ti['pageEngagement']

Contains the number flag of a page. Examples:

  • Article (10)
  • Home (15)
  • Video (10)
  • Image (2)

Data Layer for Article Pages

In addition to the basic data layer for all pages, the following data layer needs to be added to all article pages of the website. Use this data layer on article pages to store the word count per article. Later you can explore which article length your users prefer and view the average share of read words based on the number of words in the article and a reading speed of 200 words per minute.

Example

window._ti['wordsCount'] = '650';
JS
Data Layer VariableDescription
window._ti['wordsCount']
Contains the exact number of words per article, for example 650.

Data Layer for Paywall Pages

Great content attracts a lot of visitors. At some point, you might want your users to pay for high-quality content or because they have reached the total number of free articles. So sooner or later they hit a paywall – no matter if it is a metered, a dynamic or a freemium one. Does your subscription business model work as intended? How do your first-time website visitors react? How many users make paywall purchases after clicking your ad? To track these and other insights, add this data layer to all article pages with active paywalls and all other pages where a paywall is activated.

Example

window._ti['paywall'] = 'true';
JS
Data Layer VariableDescription
window._ti['paywall']

Flag for (article) pages with active paywall.

Provide the value 'true' with active paywall only.

Data Layer for Product & Order Pages

The following codes are only relevant if you have a shop section on your website or any kind of content/products you want to track via e-commerce tracking. Typical examples for the latter are different subscription models or paid academic courses. For the product and purchase process, you need to extend the data layer with additional information about the product and order details. For the data layers of product and order confirmation pages, you must note the following points:

  • For the product and purchasing process, you must extend the data layer with additional information about the product and order details.
  • For the product detail pages, it is necessary to track product-specific information such as product IDs and costs.
  • The order confirmation pages must track the user's entire purchase, including all product IDs, shipping costs, and so forth.

Data Layer for Product Detail Pages

Additional to the basic data layer for all pages, the following data layer needs to be added to all product pages of the website.

Example

window._ti['productId'] = 'pw1234';
window._ti['productStatus']= 'view';
window._ti['productName'] = 'Amazing Cook Book';
window._ti['productCategory'] = 'Books';
window._ti['productSubcategory'] = 'Cook books'; 
JS
Data Layer VariableDescription
window._ti['productId']

The ID of the product as mentioned in the product catalog (usually the article number). Example IDs:

  • 1700851554
  • LS721C08D-K11
window._ti['productStatus']

Indicates whether a product is viewed, added, or purchased.
view = The status must be set to "view" if it is viewed but not placed in the shopping cart.
add = The product is placed in the shopping cart but not yet purchased.
To track the status of view and add in Mapp Intelligence accordingly, it is necessary to force a tracking request to Mapp Intelligence when the user places the product in the shopping cart. Onclick on the "Add to Cart" function, the data layer must be updated with the following values before calling the function to send the page update.

window._ti['productQuantity'] = '1';
window._ti['contentCategory'] = 'add-to-cart';
window._ti['contentSubcategory'] = 'add-to-cart';
window._ti['productStatus'] = 'add';
wts.push(['send','pageupdate'])
JS

'productQuantity' indicates how many items of the product have been added to the cart.

window._ti['productName']
Contains the product title or another descriptive name of the product.
window._ti['productCategory']
Contains the product category, for example  'living', 'art', 'travel', 'books', 'academy'.
window._ti['productSubcategory']
Contains the subcategory of the product, for example  'courses', 'cook books', 'cruises'.

If you purchased the "Product Recommendation Add-on", you do not need to track product categories. Please get in touch with your account manager.

Data Layer for Confirmation Pages

Additional to the basic data layer for all pages, the following data layer needs to be added to all order confirmation pages that are displayed after successful purchases or paywall pages.

Example

window._ti['productName'] = 'Amazing Cook Book;Monopoly';
window._ti['productCategory'] = 'Book;Games';
window._ti['productSubcategory'] = 'Cook books;Board games';
window._ti['productId'] = 'cb1235;bg1234';
window._ti['productCost'] = '34.95;29.95';
window._ti['productQuantity'] = '1;2';
window._ti['productStatus'] = 'conf';
window._ti['orderValue'] = '70.00';
window._ti['orderId'] = 'UID-3429';
JS

If there are multiple values for a variable, the values need to be separated by a semicolon in the exact same order for all variables.

Data Layer VariableDescription
window._ti['productName']
Contains the product title or some other descriptive name of the product.
window._ti['productCategory']

Contains the product category. Example values are:

  • Books
  • Academy
  • Art
  • Living
  • Travel
  • Games
window._ti['productSubcategory']

Contains the subcategory of the product. Example values are:

  • Academic Courses
  • Cook books
  • Board games
  • Cruises
window._ti['productId']

Contains all product IDs of the purchase.


The ID must be identical to the ID used in the product catalog.
window._ti['productCost']
Contains the individual costs per item.
window._ti['productQuantity']
Displays the number of purchased items per product.
window._ti['productStatus']
Indicates that the order transaction has been confirmed. Must be set to conf.
window._ti['orderValue']
Contains the total order value of the purchase, including all additional costs such as shipping and taxes, but without discounts. Example: productCosts+shippingCost+payment-discounts
window._ti['orderId']

The order ID of the purchase. Each order ID must be unique.


Data Layer for Internal Searches

The internal search is an essential navigation element widely used for web pages. It is also an excellent web analyses tool for obtaining information on website visitors to optimize, for example, the conversion rate. With the help of internal search analysis, you can better understand which keywords are used by visitors during a session, on which pages this search takes place and, which target pages visitors access later. Additional to the basic data layer for all pages, the following data layer needs to be added to the search results page to track the number of search results.

Example

window._ti['numberOfSearchResults'] = '15';
JS
Data Layer VariableDescription
window._ti['numberOfSearchResults']
The quantity of the search results as a number.