isobject Element
Collect active data about what products are viewed in the search results, product detail pages, and recommendation.
- object = Product
You must specify a dw.catalog.Product object as part of an expression for the tag.
You can also specify objects in a loop. In the following example, the item is in a loop as it processes products in a search result.
When
view = “searchhit”
, the object passed should be of typeProductHit
.- view = "none" | "searchhit" | "recommendation" | "setproduct" | "detail"
-
none - Collects search information for the storefront toolkit but doesn't count the object as a product hit for active merchandising. For example, you might want to use this for templates where no search hits are found. This attribute can be used to collect information for the Storefront Toolkit Search Information Tool even if active merchandising isn't enabled for the instance. The passed object attribute is an instance product search model object. For example,
- searchhit - Collects one product impression for each time the page is viewed and collection search information for the storefront toolkit search information tool. This attribute can be used to collect information for the Storefront Toolkit Search Information Tool even if active merchandising isn't enabled for the instance.
- recommendation - Collects one product impression for each time the page is viewed. This attribute never passes search information to the Storefront Toolkit Search Information Tool.
- setproduct - Collects one product impression for each time the page is viewed. This attribute never passes search information to the Storefront Toolkit Search Information Tool.
- detail - Collects one product view for each time the page is viewed. This attribute never passes search information to the Storefront Toolkit Search Information Tool.
-
none - Collects search information for the storefront toolkit but doesn't count the object as a product hit for active merchandising. For example, you might want to use this for templates where no search hits are found. This attribute can be used to collect information for the Storefront Toolkit Search Information Tool even if active merchandising isn't enabled for the instance. The passed object attribute is an instance product search model object. For example,
For specific instructions on implementing this tag for different page types, see Tagging Pages for Data Collection.
The <isobject> tag must be placed so it wraps the ISML for HTML components that represent the product: the product name, image, callout, price, swatches, and other components. The tag must be placed where <script> tags are valid.
This tag can appear any number of times in the same page, with no limit. If the same product appears in multiple tags in the same page, for the same view attribute value, only one is counted. The same product can be a searchhit and also a recommendation, but can't count as two searchhits. Because searchhit and setproduct both count for a product impression, if the same product is contained in the same page as both a searchhit and setproduct, only one impression is counted.
It isn't necessary to wrap the HTML content for every representation of every product that appears in the site. For example, it isn't appropriate to wrap products in pages that show the contents of the cart. As of this release the only side effect of not wrapping a product representation in a template is that analytics data isn't collected in that template. The correct placement of this tag is anywhere an ISML template contains a representation of a product with the intent to merchandize that product for sale on the site. If a product representation is tagged but doesn't exactly match one of the view types listed previously, one of the view types must be chosen that captures analytics data which most closely matches the intent.
In this example, the bonus bonusproduct.isml template is wrapped, so that when a customer views it, the page impression count is incremented.