You are here:
Collect Tracking Code
Collect Tracking Code is a JavaScript snippet that captures data about the behaviors of known and unknown visitors to your site. You can use this data to enhance contact profiles and optimize customer journeys across channels through predictive and personalized recommendations. You can also update product and content catalog details in real time or track email-driven revenue.
When a visitor goes to a website that uses the tracking code, the site leaves a cookie that contains a unique ID and session ID. The cookie adds an ID to all Collect calls. The cookie tracks the user until it’s removed or cleared.
Collect Tracking Code monitors the variables and events that you select at the contact level. It can monitor these visitor attributes:
- Browser type
- User location
- Session time and length
- Page URL
- Page title
- Referrer URL
All Collect calls associated with items, such as Track Item Detail, Track Cart, and Track Purchase, must match a value in the catalog. The Status tab in the Email or Web Recommendations application provides insight into whether Collect data matches catalog data.
Collect calls can’t pass more data about the page that you’re viewing, and the name-value
pairs in the calls can't be changed. Values like item, unique_id, and email are fixed labels. Never replace fixed labels with
custom labels.
- Install Collect Tracking Code
Learn how to configure your site to use Collect Tracking Code. - Streaming Catalog Updates Through Collect Tracking Code
To configure server-side streaming updates for items in your catalog, use the API key or catalog import option. Streaming updates replaces the standard file upload process. - Set Contact Attribute Affinity
Use Collect Tracking Code to build subscriber affinity models based on contact attributes. - Set User Information and Attributes in Collect Tracking Code
To maintain user details and subscriber information in a contact profile, use the Collect Tracking Code feature in Marketing Cloud Engagement. - Track Category Viewed
Configure Collect Tracking Code to store category data for the product a contact views on your website. - Track In-Site Search
Configure Collect Tracking Code to store data about a contact’s search on your website. - Track Items in Cart
Configure Collect Tracking Code to track items that are added or removed from a contact’s cart. - Track Page View
ThetrackPageViewcall is the most common call and can capture three types of information: product or content views, categories views, or search views. - Track Items Viewed
Configure Collect Tracking Code to track the items that a contact views on your site. - Track Purchase Details
Configure Collect Tracking Code to store details about a contact’s purchases from your website. - Track User Rating
Configure Collect Tracking Code to store contact ratings for items on your website. - Configure trackWishlist for Behavioral Triggers and Collect Tracking Code
To store customer wishlists for items on your site, set up Collect Tracking Code with trackWishlist. Consult your web developer to configure Collect Tracking Code in Marketing Cloud Engagement. - Third-Party Cookies in Marketing Cloud Engagement
Marketing Cloud Engagement uses third-party cookies to track how users interact with your websites. Most web browsers have discontinued—or are in the process of discontinuing—support for third-party cookies. To ensure that you have access to the same engagement data that you’ve always had, Marketing Cloud Engagement uses partitioned cookies, sometimes known as Cookies Having Independent Partitioned State (CHIPS).

