Information for: DEVELOPERS   PARTNERS   SUPPORT

Identifying your website visitors

How Customer Data Platform (CDP) ties everything together

To identify website visitors, CDP relies on the data sent via the CDP Webtag Library. A SourceCustomerNumber or Email needs to be established to identify your users on your website. If no SourceCustomerNumber or Email is available, it is assumed to be an anonymous user with anonymous events. If the user eventually is identified during that same session, then all anonymous events are then associated to the known user. Otherwise, those events are disregarded as there would be no way to match them to a known user. Note : CDP defines a session as a 30 minute time window before/after identification.

Therefore, clients implementing the CDP webtag should try to pass in a known SourceCustomerNumber or Email whenever possible, even if the user is not currently authenticated on the website. This can be done using an identification cookie which is set to any known user and can be used on subsequent visits to the website (similar to some cart cookies that save what items are currently in your cart even if you leave the page and come back).

Note that the value used for SourceCustomerNumber (or Email) should not be cached as part of the page to ensure it is accurately identifying the user generating the events.

Customer instances

To identify customers, the CDP Webtag Library provides a customer model to easily store customer identifiers once and reuse them as needed on your page. To create a customer instance using the model-oriented approach, you would do the following :

var currentVisitor = $A1.Customer({
    SourceCustomerNumber: "123456",
    Email: "[email protected]"
});

In this example we provide the SourceCustomerNumber to identify the web customer. In addition, we provide an optional (but recommended) attribute (email) to help us match this web persona to the same customer in other source systems (email, in-store, etc.). This additional attribute should match an attribute on the customer feed or ESP feed to help match this customer across different source systems. The SourceCustomerNumber should match what you are sending to CDP in the standard customer feed.

Next Steps - List of events that CDP tracks

Now that you know how to pass your visitor’s identification to CDP to tie them to existing contacts, you can head over to the next article to see what events CDP tracks : List of tracked events.