To unify your customer data on Salesforce, connect your Progressive Web App (PWA) Kit storefront to Data Cloud. After you set your store as a data source, Data Cloud receives engagement events, which are triggered by shopper activities in your storefront.
These engagement events are supported.
ViewPage — A shopper views a page.
ViewProduct — A shopper views a product detail page.
ViewCategory — A shopper views a category or listing page.
ViewSearchResults — A shopper performs a product search.
ViewRecommendations — A shopper views personalized recommendations.
Prerequisites
To use Data Cloud with PWA Kit, you must first set up your own production instance of Data Cloud. See Get Started Using Data Cloud in Salesforce Help.
Send PWA Kit Events to Data Cloud
To connect your storefront to Data Cloud, complete the instructions from Connect a Website or Mobile App to Data Cloud in the Data Cloud Integration Guide. When the New Connection window asks what you’re connecting to, select A Custom Website.
To start sending data from your storefront to Data Cloud, complete the instructions from Create a Web or Mobile App Data Stream in the Data Cloud Integration Guide.
Get the Data Cloud tenant ID.
In Data Cloud, click at the top of the page, and then select Data Cloud Setup.
In the Your Home Org Details section, copy and save the tenant ID from the tenant endpoint. The tenant ID is the string preceding the first period. For example, <tenantId>.c360a.salesforce.com.
Get the Data Cloud app source ID.
Go back to Data Cloud Setup.
In the Set Up Data Cloud section, click Connect Other Data Sources | Website and Mobile App.
Select the connection for your PWA Kit storefront.
In the Integration Guide section, copy and save the app source ID from the script. The app source ID is the string preceding /scripts. For example, https://cdn.pc-rnd.c360a.salesforce.com/beacon/c360a/<appSourceId>scripts/c360a.min.js.
Update your PWA Kit project’s configuration file with the Data Cloud tenant and app source IDs from steps 3 and 4. Here’s an example configuration file with the IDs populated: