Category Tracking
Category Tracking
Use the category
and categoryview
tracking commands to capture when a visitor views a page that presents product categories. This improves the accuracy of interaction tracking for product catalog, category landing pages, or filtered category views.
Purpose
Category tracking:
Signals that the user is browsing a category page
Enables better segmentation and reporting on category-level interactions
Tracking Commands
category
(for each category shown)product
(if any products are displayed)categoryview
(once per page)submit
(finalizes the state)
1. category
Object
category
ObjectPush one category
object for each category shown on the page.
Mandatory Properties
id
Internal identifier of category
string
"C8"
name
Display name of the category
string
"Furniture"
Example
_jts.push({
track: "category",
id: "C8",
name: "Furniture"
});
2. categoryview
Command
categoryview
CommandPush this command once, after all category
and product
pushes are complete.
Example
_jts.push({
track: "categoryview"
});
No additional properties are required.
Full Example
// [START] General Pageview
_jts.push({ track: "pageview" });
// [CATEGORY] Category information
_jts.push({
track: "category",
id: "C8",
name: "Furniture"
});
// [PRODUCTS] Products shown under the category
_jts.push({ track: "product", id: "1" });
_jts.push({ track: "product", id: "2" });
// [CATEGORYVIEW] Category view summary
_jts.push({ track: "categoryview" });
// [SUBMIT] Final submission
_jts.push({ track: "submit" });
Summary
Use one
category
push per category displayedTrigger
categoryview
once to finalize the interactionInclude any
product
pushes if products are shown under categoriesFinalize the interaction state with a
submit
This approach ensures category pages are clearly marked and measurable across your tracking stack.
Last updated
Was this helpful?