2. Page Context
Page context allows the platform to gain and store information on the customer's journey with the website, and allows for a deeper understanding to launch personalization campaigns according to targeting conditions.
Page Contexts Structure
There are six types of page context:
HOMEPAGE
For the site's main page, no data
array is used;
CATEGORY
For category pages the hierarchy of categories from the broadest to the narrowest is passed in the data
array. Categories should match the product feed. Example:
PRODUCT
For product pages the SKU of the product is passed in the data
array. The product SKU must match the product feed. Example:
CART
For the cart page the SKUs of all products in the cart are passed in the data
array. Example:
SEARCH
data
array contains the search query. Used for search pages (including empty search). If there is a dedicated search page, opening the page without entering a query passes an empty array. In a live search, the array is updated when a new pageview is sent to the analytics platform or each time the search results are rendered. Example:
OTHER
For all pages that do not fit the descriptions above. Example:
OTHER
should be used on static pages, such as category pages (typically synthetic ones) not included in the product feed, etc.
Example of properly installed scripts on a cart page
The correct order of script elements:
Preconnect and prefetch;
Declaring the GF variable and specifying the Page Context;
core.js script
Multilingual and/or Multiregional setup
If the site/app works with multiple languages or the business has different prices and availability on offer for different regions, it is necessary to take this into account in the context according to the following documentation:
Last updated
Was this helpful?