You can categorize your site content and products through a combination of Category IDs in your tag functions and the Category Definition File (CDF), an offline file upload.
There are two types of categorization within Digital Analytics: product categorization and page categorization. Product categorization is captured in the Product View, Shop Action 5, and Shop Action 9 tags and displayed in the Product Categories report. Page Category data is captured in the Page View and Technical Properties tags and displayed in the Page Categories report.
Category IDs are captured in the Page View, Product View, Shop Action 5, Shop Action 9, Technical Properties, and Error tags to assign a particular page or product-related action to a particular category. The Category ID specifies only the immediate leaf category that the action belongs to, and does not contain any sense of a larger hierarchy within it. The Category ID for a given product should be consistent across the Product View, Shop Action 5, and Shop Action 9 tags.
Product Categories Categorization Inheritance
To simplify the implementation of product tag categorization, Digital Analytics features server-side Category ID inheritance processing. This processing causes uncategorized Shop Action 5 and Shop Action 9 tags to be categorized according to other categorized Product View tags or Shop Action tags collected for the same product within the same data collection session. These rules are applied during the processing of daily report data.
Category inheritance at the time of report processing follows these rules:
- Product View tags do not inherit categorization from other tags including other categorized Product View tags in the same session. Product View tags should always be collected with valid values in the Category ID parameter.
- Shop Action 5 tags that are collected without a Category ID inherit the Category ID from another same-session Shop Action 5 tag having the same Product ID. If no matching Shop Action 5 tag with a categoryID is found in the session, inheritance devolves upon a matching Product View tag with a non-null Category ID.
- Shop Action 9 tags that are collected without a Category ID inherit the categoryID from another same-session Shop Action 9 tag having the same Product ID. If no Shop Action 9 tag with a Category ID is found in the session for that Product ID, inheritance devolves upon the Shop Action 5 tag or Product View tag, in this order: 1) a matching Shop Action 5 with a non-null categoryID or 2) a matching Product View tag with a non-null Category ID.
In certain special cases, Digital Analytics categorization inheritance processing might not be able to achieve 100% complete categorization in Product Categories.
- Persistent Carts: visitors viewing a saved cart in a new session, and/or completing a purchase might not view product detail pages, resulting in a lack of a categorized Product View tag for the Shop Action tags to inherit categorization from. In this case, a valid Category ID parameter value should be included with the Shop Action 5 tags sent when the persisted cart is retrieved and viewed. Shop Action 9 tags inherit categorization from the Shop Action 5 tags and need not be categorized.
- Direct add-to-cart Site Functionality: This site functionality typically allows visitors to bypass the product detail page and associated Product View tag data collection by adding items directly to the cart from product category display pages. If no Category ID value is sent with a Shop Action 5 tag, this tag and any subsequent Shop Action 9 tags for this Product ID is uncategorized in reporting due to lack of a categorized Product View tag in the session. In this case, a valid Category ID parameter value should be included with the individual Shop Action 5 tag sent when the add-to-cart event occurs.