---
schema_version: "1"
id: ce887cad7fcb6692d643e6230a210672f82abaccf8f74c8f2ca65ec539c181f5
title: Capture Web Interactions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/interactions-sdk/guides/c360a-api-salesforce-interactions-web-sdk.md
canonical_url: https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-salesforce-interactions-web-sdk.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 40a1337112c7e00e7d931b09310c20162d7ebd95984afb19649ed01c106c4294
products:
  - Salesforce Interactions SDK
  - Data 360 Developer Documentation
---
# Capture Web Interactions

**note:** As of October 14, 2025, Data Cloud has been rebranded to Data 360. During this transition, you may see references to Data Cloud in our application and documentation. While the name is new, the functionality and content remains unchanged.

Salesforce Interactions SDK is an extensible data capture and collection framework that you can use to track different user interactions on your website and send that information to Salesforce. This information can then be used to build behavior profiles for web visitors, audience segmentation, or Salesforce integrations.

The SDK consists of a base SDK and product-specific modules for [Data 360](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-salesforce-cdp-module-of-the-salesforce-web-sdk.md) and [Marketing Cloud Personalization](https://developer.salesforce.com/docs/marketing/personalization/guide/web-integration.html#personalization-module-of-the-salesforce-interactions-sdk). The SDK uses a unified event data model shared across both modules. This unified data model allows for capturing and integrating key business objects and user and behavioral data through event capture in a consistent format across Data 360 and Personalization. The unified data model also enables you to use a single SDK to integrate with either Data 360, Personalization, or both together.

Salesforce Interactions SDK uses the `SalesforceInteractions` namespace, which encapsulates all the SDK’s components. To learn more about the SDK, see [Salesforce Interactions SDK](https://help.salesforce.com/s/articleView?id=c360_a_salesforce_web_sdk.htm) on Salesforce Help. For information about setting up the Salesforce Interactions SDK in Data 360, see [Set Up the Salesforce Interactions SDK](https://developer.salesforce.com/docs/data/data-cloud-int/guide/c360-a-admin-web-sdk-setup.html).

Salesforce Interactions SDK provides:

- Tracking of customer interactions
- Identity and cookie management for anonymous and named identity tracking
- Consent management integration hooks
- Configuration-driven instrumentation with sitemaps
- Integration hooks for adding custom functionality

## Requirements

Your website customers need a browser capable of running ES6-compatible code.

## Track User Interactions

The `sendEvent` API call is how you capture interactions and collect associated data from a website customer. An interaction event has a named identifier, like `View Catalog Object`, required values, like `catalogObject` or `order`, and tracked user-defined values. For example, here’s a `View Catalog Object` event:

```javascript
SalesforceInteractions.sendEvent({
  interaction: {
    name: "View Catalog Object",
    catalogObject: {
      type: "Product",
      id: "65e4e737",
      attributes: {
        description: "Shoes",
      },
    },
  },
});
```

Salesforce Interactions SDK also comes with ready to use event data models to use across Salesforce.

## Identity and Cookie Management

Salesforce Interactions SDK supports anonymous and named identity tracking using first-party cookies or by being passed identity information from the website. Cookies are prefixed with `_sfid` and end with a string of characters unique to the domain to which the cookie belongs. You can customize cookie and identity behavior either through configuration or through calling the [Identity APIs](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-identity.md) in Salesforce Interactions SDK.

## Consent Management

Not all website visitors and customers consent to cookie tracking. To support consent management, Salesforce Interactions SDK is designed to send events only if a customer has consented to tracking. When consent is revoked, the Web SDK captures this preference and then immediately stops emitting events. For example, this method passes consent into Salesforce Interactions SDK.

```javascript
SalesforceInteractions.init({
  consents: [
    {
      provider: "ExampleProvider",
      purpose: "Tracking",
      status: "Opt In",
    },
  ],
});
```

Capturing customer consent can be handled either through configuration or through calling the [Consent API](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-consent.md) in Salesforce Interactions SDK.

## Sitemap

Salesforce Interactions SDK Sitemap is a configuration-driven integration layer that executes within and is deployed with the Web SDK. A Sitemap is developed to integrate with a specific site using the API provided by the Web SDK that maps key business objects to interaction events.

**See Also**

- [Event Specifications](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-event-specifications.md)
- [API Reference](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-api-reference.md)
- [Data 360 Module of the Salesforce Interactions SDK](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-salesforce-cdp-module-of-the-salesforce-web-sdk.md)
