---
schema_version: "1"
id: 84ed0fa213a89f4f37a569d25a352bee4205b5f334f3d0ce40f769dfab7a596b
title: Track Activity on External Sites
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mktg_consent_tracking_external.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mktg_consent_tracking_external.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1eabbb825a2994ce80b836d08a38ba0946df0aaaad1d46068b85be4d74d950fc
description: Track visitor activities on web pages hosted outside of Salesforce, such as your company website. To protect the privacy of your site visitors, use a consent banner to collect consent to track. You’re responsible for complying with privacy laws and regulations applicable to your business.
products:
  - Marketing
release: "264"
---
# Track Activity on External Sites

Track visitor activities on web pages hosted outside of Salesforce, such as your company website. To protect the privacy of your site visitors, use a consent banner to collect consent to track. You’re responsible for complying with privacy laws and regulations applicable to your business.

### Required Editions

[View supported editions](https://help.salesforce.com/s/articleView?id=mktg.mktg_editions.htm&release=264.0.0&type=5 "Marketing Cloud Next is available in Growth and Advanced editions, and requires Salesforce Enterprise or Unlimited editions. Some features are limited by edition or purchased add-on. All functionality is available in Lightning Experience only.").

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d55915e47">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d55915e47 ">To configure external tracking:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d55915e47 ">
              <p style="margin-bottom:0;">Marketing Cloud Admin permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

- If you’re setting up external tracking for the first time, create a website connector, and then create embed code that you add to your external site.
- If you've set up external tracking before Winter ‘26, update your external tracking configuration.
- Create a consent banner in Salesforce CMS for tracking activity on your website.

#### See Also

- [_Knowledge Article:_ Data Cloud: Salesforce CRM Data Stream Refresh Errors due to Missing Field or Object](https://help.salesforce.com/s/articleView?id=000395797&type=1&language=en_US)

## Create External Tracking Configuration

First, create a website connector that collects activity data from your external site. Then, create the embed code to add to your external site and associate it with your website connector, a consent banner, and a campaign.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mktg_all-264-0-0-production-enus/e92be4e1-4bef-47a5-a11d-95f4ea1f7d7a/images/icon_important.png)

Important In most cases, you can reuse the same website connector for multiple embed codes. However, if you’re a Data Cloud One user, create and use a unique website connector for each org that has web tracking enabled.

1. Create a website connector.
    1. From Setup, in the Quick Find box, enter Web Tracking, and then select **Website Connectors**.
    2. Click **New**.
    3. Name the website connector and click **Create**.
2. Create the embed code.
    1. From Setup, in the Quick Find box, enter Web Tracking, and then select **Webpage Embed Codes**.
    2. Click **New**.
    3. Name the embed code and select a website connector.
    4. In the Configure Tracking Settings section, click **Select Banner**.
        
        If you use a third-party consent management platform such as OneTrust, skip this step. These platforms aren't supported by Salesforce and you're responsible for complying with privacy laws and regulations that apply to your business.
    5. Select a banner and save your work.
    6. Select a campaign to associate with the engagement data.
    7. Click **Create**.
3. To turn on data collection on your website, copy the embed code and add it to your website’s head tag.

To track activity without collecting consent, don’t select a banner in Salesforce Setup. Instead, add this code snippet to your external website before the embed code:

```
<script>
    document.addEventListener("consentbannerready",() => {
        const consent = {
            provider: "Salesforce Marketing Cloud",
            purpose: "Tracking",
            status: "Opt In"
        };

        window.getSalesforceInteractions().init({
            consents: [consent],
        }).then(() => {
            window.getSalesforceInteractions().initSitemap({pageTypes: []});
        });
    });
</script>
```

## Update External Tracking Configuration

If you set up external tracking before Winter ‘26, update your external tracking configuration to access the latest feature updates. Copy the web tracking script, and replace the existing script on your website.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mktg_all-264-0-0-production-enus/e92be4e1-4bef-47a5-a11d-95f4ea1f7d7a/images/icon_important.png)

Important If you don't see your connectors and you created them before Summer ’25, contact Salesforce Customer Support to regain access to your website connectors with required updates.

1. From the Website Connectors page, configure your web tracking connector.
2. Copy the embed code and replace the existing code in your webpage's head tag.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mktg_all-264-0-0-production-enus/e92be4e1-4bef-47a5-a11d-95f4ea1f7d7a/images/icon_note.png)
    
    Note For accurate reporting of your website data, replace the script on your website.
3. Save your changes.