---
schema_version: "1"
id: 8507e270bb81896e307c25cbb5a34e5756279ee2c6c809c1118104b6176172a4
title: Track In-Site Search
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_ctc_track_in_site_search.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_in_site_search.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ccdd607663ab5ba0d0d68336957f6426ebacafd40ffe442e2b68b1d2298ac10c
description: Configure Collect Tracking Code to store data about a contact’s search on your website.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Track In-Site Search

Configure Collect Tracking Code to store data about a contact’s search on your website.

The Track In-Site Search call isn’t required. We recommend that you don’t use it unless it’s explicitly needed for your use case.

1. Copy the code and replace `INSERT_SEARCH_TERM` with dynamic code that pulls in the search term.
    
    ```
    <script type="text/javascript">
        _etmc.push(["setOrgId", "MID"]);
        _etmc.push(["trackPageView", { "search" : "INSERT_SEARCH_TERM" }]);
    </script>
    ```
2. Paste the modified script in the header code on your detail 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 Category Viewed](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_track_category_view.htm&release=264.0.0&type=5 "Configure Collect Tracking Code to store category data for the product a contact views on your website.")
- [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.")