This function lets you share a visitor’s Experience Cloud ID across domains when browsers block third-party cookies. To use this function, you must have implemented the ID service and own the source and destination domains. Available in VisitorAPI.js version 1.7.0 or higher.
Contents:
ID service writes a first- and third-party cookie to the browser when a person visit your site (see Cookies and the Experience Cloud Identity Service ). The first-party cookie contains the MID, a unique ID for that visitor. The third-party cookie contains another ID used by the ID service to generate the MID. When a browser blocks this third-party cookie, the ID service cannot:
To help solve this problem, implement Visitor.appendVisitorIDsTo( *
url*)
. This property lets the ID service track site visitors across multiple domains even when their browsers block third-party cookies. It works like this:
Visitor.appendVisitorIDsTo( *
url*)
appends the MID as a query parameter in the URL redirect from the original domain to the destination domain.See the code sample for details.
The following example can help you get started with Visitor.appendVisitorIDsTo( *
url*)
. When implemented properly, your JavaScript code could look similar to the following example.
//Code on Domain A
var destinationURL = "www.destination.com";
//Call the ID service
var visitor = Visitor.getInstance(...);
//Append visitor IDs to the destination URL
var destinationURLWithVisitorIDs = visitor.appendVisitorIDsTo(destinationURL);
//Result of appendVisitorIDsTo includes destination URL, Experience Cloud ID (MCMID), and Analytics ID (MCAID)
"www.destination.com?adobe_mc=MCMID=1234|MCAID=5678"
//Redirect to the destination
Support for | See |
---|---|
DTM |
|
SDK |