---
schema_version: "1"
id: 9af3cf913b1a2e9e7020f8a0bd1af10c39a773730d0bcd2b3fd6e94362e040f1
title: Anonymous and Known Profile Data
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/interactions-sdk/guides/c360a-api-anonymous-known-profile-data.md
canonical_url: https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-anonymous-known-profile-data.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b6c1ee5012f6a2522eb5e77dec810d61fa1f638c4231966159f53900ef35aaad
products:
  - Salesforce Interactions SDK
  - Data 360 Developer Documentation
---
# Anonymous and Known Profile Data

To associate behavioral data with an anonymous user in Data 360, you must first capture a profile event for that user. Until a profile event is captured (such as, during login), behavioral data isn’t available, and the anonymous user remains unlinked.

## Example

With the recommended schema, use the `identity` event for this purpose. The Web SDK assigns a new `anonymousId` to a customer when they first visit or when their identifier changes. At the same time, it sends a blank `identity` event to serve as the initial profile event. This ensures that behavioral data can be collected for the anonymous user and later associated with their known profile once they log in.

```javascript
const { OnSetAnonymousId } = SalesforceInteractions.CustomEvents;
document.addEventListener(OnSetAnonymousId, () => {
  SalesforceInteractions.sendEvent({
    user: {
      attributes: {
        eventType: "identity",
        isAnonymous: 1,
        firstName: "",
        lastName: "",
      },
    },
  });
});
```
