Capture Web Interactions
The SDK consists of a base SDK and product-specific modules for Data Cloud and Marketing Cloud Personalization. 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 Cloud and Personalization. The unified data model also enables you to use a single SDK to integrate with either Data Cloud, Personalization, or both together.
Salesforce Interactions SDK uses the SalesforceInteractions namespace, which encapsulates all of the SDK’s components. To learn more about the SDK, see Salesforce Interactions SDK on Salesforce Help. For information about setting up the Salesforce Interactions SDK in Data Cloud, see Set Up the Salesforce Interactions SDK.
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.
Tracking User Interactions
1SalesforceInteractions.sendEvent({
2 interaction : {
3 name : "View Catalog Object",
4 catalogObject: {
5 type : "Product",
6 id : "65e4e737",
7 attributes: {
8 description: "Shoes"
9 }
10 }
11 }
12})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 in Salesforce Interactions SDK.
Consent Management
1SalesforceInteractions.init({
2 consents: [{
3 provider: 'ExampleProvider',
4 purpose: 'Tracking',
5 status: 'Opt In'
6 }]
7})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.