This document outlines adding the Nosto tagging using Storefront Reference Architecture (SFRA). You can find an example SFRA implementation here .
Path for files below are based on SFRA so you must make sure you are adding the code snippets into the relevant cartridge. Sample files below are present in int_nosto_sfra cartridge for comparison purpose.
htmlHead.isml
Adds the Nosto include script to all pages (html head).
Path: app_storefront_base/cartridge/templates/default/common/htmlHead.isml
Copy <iscomment>NOSTO Script Tag</iscomment>
<isinclude template="nostoHeaderScript"/>
homePage.isml
Adds page type tagging to the home page / front page of a store.
Path: app_storefront_base/cartridge/templates/default/home/homePage.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getHomePageTypeTag()}" encoding="off"/>
cart.isml
Adds page type tagging to the cart page.
Path: app_storefront_base/cartridge/templates/default/cart/cart.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCartPageTypeTag()}" encoding="off"/>
Adds cart tagging to all pages.
Path: app_storefront_base/cartridge/templates/default/components/footer/pageFooter.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCartTag()}" encoding="off"/>
productDetails.isml
Adds product tagging to product detail pages.
Path: `app_storefront_base/cartridge/templates/default/product/productDetails.isml``
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getProductTags(pdict.product.id)}" encoding="off"/>
bundleDetails.isml
Adds product tagging to product bundle pages.
Path: app_storefront_base/cartridge/templates/default/product/bundleDetails.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getProductTags(pdict.product.id)}" encoding="off"/>
setDetails.isml
Adds product tagging to product set pages.
Path: app_storefront_base/cartridge/templates/default/product/setDetails.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getProductTags(pdict.product.id)}" encoding="off"/>
searchResults.isml
Adds category tagging to search results page.
Path: app_storefront_base/cartridge/templates/default/search/searchResults.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCategoryTags(pdict.productSearch.category.id)}" encoding="off"/>
catLanding.isml
Adds category tagging into category pages.
Path: app_storefront_base/cartridge/templates/default/rendering/category/catLanding.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCategoryTags(pdict.productSearch.category.id)}" encoding="off"/>
confirmation.isml
Adds order tagging to order confirmation page.
Path: app_storefront_base/cartridge/templates/default/checkout/confirmation/confirmation.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getOrderTags(pdict.order.orderNumber)}" encoding="off"/>
page.isml
Adds customer tagging to all pages.
Path: app_storefront_base/cartridge/templates/default/common/layout/page.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCustomerTags()}" encoding="off"/>
checkout.isml
Adds customer tagging to checkout pages.
Path: app_storefront_base/cartridge/templates/default/common/layout/checkout.isml
Copy <isscript>
var nostoHelper = require('int_nosto/cartridge/scripts/helpers/nostoHelper').getNostoHelper();
</isscript>
<isprint value="${nostoHelper.getCustomerTags()}" encoding="off"/>