For updated information, please see: Category-&-Brand-tagging in our GitHub
The category tagging is done on different category levels so that Nosto can track what is the current and actively viewed category.
<!-- Tag your category page with the category path, replace static example values to equivalent database/ecom engine variables -->
<div class="nosto_category" style="display:none">/Sales/Boats</div>
Unlike other tags, category tag can be output using scripting as a customer can load the same category level following different browsing patterns.
The only rule of thumb is to keep the tag’s output consistent with product page’s category tags. Category hierarchy levels are separated using a forward slash.
For example if a product is a Canoe under Boats and Outdoors sub and main-categories, the category tag on a product page is:
Following the example category tag on category pages when viewing Boats in Outdoors department should be:
<div class="nosto_category" style="display:none">/Outdoors/Boats</div>
And when sub-sub-category Canoes is viewed:
<div class="nosto_category" style="display:none">/Outdoors/Boats/Canoes</div>
Note the difference: tag on category page is nosto_category, but when product is associated and attached to a category on a product page, the tag is category.
Active Category on Product Pages
Products often belong to multiple categories in the site’s navigation hierarchy and also to special categories, so you might need to apply an additional “nosto_category” tagging also on product pages, which overrides for the page load what’s mapped for the product itself.
In practice, a present nosto_category tag on product detail pages allows attaching a product dynamically to only one specific category. Typically this is based on the browsing pattern a visitor used to find the currently viewed product.
Applying active category tagging on product pages is optional, but valuable when a product is associated with multiple categories in the implementation. Unless applied, disruptions typically occur when cross-selling with category filters are used on product pages as Nosto’s algorithms have hard time to distinguish which category a product belongs to, causing overlapping in recommended products.