---
schema_version: "1"
id: 7b2d84729ede285ff4e2a7920091f6ccee29bb4a879ffc7001eb064f010c8cc5
title: Track Category Viewed
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_ctc_track_category_view.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_category_view.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c0d49dbf2805d0e6e0f23126249091e4d6987df334bcbaae8741975fed78109d
description: Configure Collect Tracking Code to store category data for the product a contact views on your website.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# 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>
```

1. Copy and customize the code by replacing `INSERT_CATEGORY` with dynamic code for the category of items viewed.
2. Add the modified script in the header code on your category pages.

#### See Also

- [Install Collect Tracking Code](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_install_collect_code.htm&release=264.0.0&type=5 "Learn how to configure your site to use Collect Tracking Code.")
- [Track In-Site Search](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_in_site_search.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store data about a contact’s search on your website.")
- [Track Items in Cart](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_cart.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to track items that are added or removed from a contact’s cart.")
- [Track Page View](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_page_view.htm&release=264.0.0&type=5 "The trackPageView call is the most common call and can capture three types of information: product or content views, categories views, or search views.")
- [Track Purchase Details](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_conversion.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store details about a contact’s purchases from your website.")
- [Track User Rating](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_rating.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store contact ratings for items on your website.")
- [Validate Collect Tracking Code Implementation](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_validate_collect_code_implementation.htm&release=264.0.0&type=5 "After you configure a catalog and deploy Collect Tracking Code to your website, test it to make sure it’s installed properly.")