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.