ID service customers should refer to this section for information on how to read the visitor cookie for the IDs required to make DCS API calls.
The Adobe Experience Platform Identity Service assigns visitor and region IDs to users who come to your website. These IDs identify users across all the solutions in the Experience Cloud and they are required if you want to make DCS calls.
ID service customers can extract this information from the ID service cookie or by calling a function. The table below describes the tasks or steps you need to complete to get started.
Code in italics represents a variable placeholder.
1. Check your Experience Cloud status
You need a Experience Cloud account to use the ID service. If you have a Experience Cloud account, great!
If you're not part of the Experience Cloud, then sign up. We'd love to have you and there's always room for more. For instructions on how to set up an account, see Enabling Your solutions for core services.
2. Set up the ID service
3. Read the ID service cookie
The ID service stores the user and region ID in the AMCV cookie. The full cookie name is
Parse the AMCV cookie for these key-value pairs:
You can make calls to the DCS once you have the user and region IDs.
4. Retrieve the Experience Cloud ID with getMarketingCloudVisitorID
(Optional) This function returns the Experience Cloud visitor ID. It is designed for custom solutions and specific use cases. See Working With getMarketingCloudVisitorID below and the related ID service documentation.
You don't need to use this if you get the user and location IDs from the ID service cookie.
Another way to get the visitor ID is with the
getMarketingCloudVisitorID function. When invoked, this function queries the ID service and returns an ID.
getMarketingCloudVisitorID accepts the optional
callback argument as shown:
var analyticsID = visitor.getAnalyticsVisitorID(callback)
callback is optional. This function works without it, but returns an ID only when a visitor has a Experience Cloud cookie in their browser. If the visitor cookie is missing, or a visitor doesn’t have an ID, the function returns an empty
() object. This can happen even after the page loads and the visitor receives a new ID. To avoid this,
callback forces this function to check for a visitor ID after the page loads. Without
callback, the visitor ID function won’t return an ID even if it’s written to the visitor’s browser later.
Once you have the user and region ID, you can start sending and receiving DCS data. See Making DCS API Calls.