Add isactivedatacontext Tags

To collect active data on the most specific category browsed on the page, add the <isactivedatacontext> tag to the <head> or <body> tags of site pages with valid <script> tags. The best location is wherever the category context of the site is most prominently indicated to the storefront customer. For example, breadcrumbs that are rendered that show the current category.

Best practice: Include this tag in exactly one template used to make up each HTML page. If this tag appears in multiple templates used to make up a single HTML page, the latest template takes precedence. For example, if one tag indicates the Hats category, and a later tag indicates the Socks category, the Socks category takes precedence. There is no negative effect if the tag appears in multiple templates with the same category value for the same HTML page, but it's redundant. If this tag doesn't appear in any templates that are used to make up an HTML page, no category context is associated with the page.

The specified category is also associated with data collected in the page about products.

Note:

If the categoryID attribute of ProductLineItem is set, Salesforce B2C updates the topCategoriesOrdered field with that category instead of the category specified by the isactivedatacontext tag.

The following table shows how this feature is implemented in SiteGenesis:

Template Tag example
components/productbreadcrumbs_left_directcategory.isml <isactivedatacontext category="${category}">
components/productbreadcrumbs.isml <isactivedatacontext category="${category}">
search/components/productsearchbreadcrumbs.isml <isactivedatacontext category="${pdict.ProductSearchResult.category}">
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.