Anonymous and Known Profile Data
To join behavioral data to an anonymous user in Data Cloud, you must
capture a profile event for the anonymous user first. If not, behavioral data isn’t available
until a profile event is captured, for example login, and the anonymous user becomes
known.
Example
When using the recommended schema, you can use the identity event for this purpose. For example, the Web SDK assigns a new anonymousId to a customer and sends a blank identity event whenever the identifier is created or changes:
1const { OnSetAnonymousId } = SalesforceInteractions.CustomEvents
2document.addEventListener(OnSetAnonymousId, () => {
3 SalesforceInteractions.sendEvent({
4 user: {
5 attributes: {
6 eventType: 'identity',
7 isAnonymous: 1,
8 firstName: '',
9 lastName: ''
10 }
11 }
12 })
13}