You are here:
Track Category Viewed
Configure Collect Tracking Code to store category data for the product a contact views on your website.
The trackpageview call is also used on category
pages to capture the category viewed by a visitor. This call uses the category
name–value pair and the label is reserved.
The category value is flexible, but we recommend that you include values that match tag fields in the catalog. Use the same structure for all type page categorizations, from categories to subcategories to brands.
Only one category is added to the Collect call at a time, so choose the most relevant term for the page being viewed. Usually, this term aligns with the most specific category. For example, on a category page with a navigation path of Men’s > Apparel > Shoes > Tennis Shoes, the category is “Tennis Shoes.” This category corresponds to a “Tennis Shoes” category in the product catalog.
<script type="text/javascript">
_etmc.push(["setOrgId", "MID"]);
_etmc.push(["trackPageView", { "category" : "INSERT_CATEGORY" }]);
</script>-
Copy and customize the code by replacing
INSERT_CATEGORYwith dynamic code for the category of items viewed. - Add the modified script in the header code on your category pages.

