---
schema_version: "1"
id: 89e1391494b47c035f1ab6ca235faba87238daf34e5cec398333296d22488f5c
title: Install Collect Tracking Code
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_ctc_install_collect_code.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_install_collect_code.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a88d3325ce77cd33585c0e0008ae77c8cdf6e6738984126392f5956c0cf9c676
description: Learn how to configure your site to use Collect Tracking Code.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Install Collect Tracking Code

Learn how to configure your site to use Collect Tracking Code.

To begin configuration of Collect Tracking Code, select **Email Recommendations** or **Web Recommendations** under Personalization Builder in the app switcher. Select Collect and complete the steps. Then install Collect Tracking Code on your site.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_note.png)

Note We recommend that you consult your web developer to complete the installation and configuration of Collect Tracking Code.

1. Copy and paste your Collect Script within the `<head>` or `<body>` section of pages on your site. Replace `MID` with your business unit account ID.
    
    **Collect Code Script**
    
    ```
    <script type="text/javascript" src="https://MID.collect.igodigital.com/collect.js"> </script>
    ```
2. Copy and paste the Set Org ID Script between the body tags of each page of your website. Replace `MID` with your business unit account ID.
    
    **Set Org ID Script**
    
    ```
    <script type="text/javascript">
        _etmc.push(["setOrgId", "MID"]); 
        _etmc.push(["trackPageView"]); 
    </script>
    ```
    
    ![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_tip.png)
    
    Tip Use Options and Configuration in Personalization Builder to modify predictive recommendations features. Changes made in Personalization Builder take effect immediately.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_note.png)
    
    Note To enable subscribers to opt out of tracking on your website, replace the Set Org ID Script with the [Do Not Track Script](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_do_not_track.htm&release=264.0.0&type=5 "Use Do Not Track Script code to suppress Collect Tracking Code on your website when a subscriber opts out of tracking. Collect Tracking Code doesn’t use browser settings to determine whether to track user activity.").

- **[Do Not Track Script](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_do_not_track.htm&release=264.0.0&type=5)**  
    Use Do Not Track Script code to suppress Collect Tracking Code on your website when a subscriber opts out of tracking. Collect Tracking Code doesn’t use browser settings to determine whether to track user activity.
- **[Configure Collect Tracking Code for Personalization Builder](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_configure_collect_code_for_predictive_content.htm&release=264.0.0&type=5)**  
    Set up Marketing Cloud Engagement to work with Collect Tracking Code and Personalization Builder.

#### See Also

- [Do Not Track Script](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_do_not_track.htm&release=264.0.0&type=5 "Use Do Not Track Script code to suppress Collect Tracking Code on your website when a subscriber opts out of tracking. Collect Tracking Code doesn’t use browser settings to determine whether to track user activity.")