Can we extract all Visitor ID's from Adobe Analytics using API

1k views Asked by At

I'm looking to determine whether it's possible via visitor API to be able to find out all visitor ID's.

2

There are 2 answers

3
CrayonViolent On BEST ANSWER

In the code examples below, [your mcorgid here] is your company's marketing cloud organization id. If you do not know this then you need to contact Adobe Client Care to get it.

getMarketingCloudVisitorID - Get the Marketing Cloud Visitor ID (mid= param)

var visitor = Visitor.getInstance("[your mcorgid here]@AdobeOrg")
var mcvid = visitor.getMarketingCloudVisitorID(); 

getAnalytcisVisitorID - get legacy visitor id (aid= if applicable)

var visitor = Visitor.getInstance("[your mcorgid here]@AdobeOrg")
var aid = visitor.getAnalyticsVisitorID(); 

getCustomerIDs - get all customer IDs

var visitor = Visitor.getInstance("[your mcorgid here]@AdobeOrg");
var customerIDs = visitor.getCustomerIDs();

s_fid - Fallback ID

There is no built-in method for retrieving this, but you can use AA's s.c_r() cookie reading utility function, or any other cookie reading method you have to look for the s_fid cookie. (sidenote: I do not recommend using DTM's _satellite.readCookie()method. It only looks for cookies on the current page's full (not root) domain, and there is no way to change that. Since AA and most other things usually set on root domain, it makes _satellite.readCookie() unreliable in practice).

var fid = s.c_r('s_fid');
0
Trevor McCormick On

Use Adobe datawarehouse and extract Experience Cloud ID. Assuming you know how to use the API already, here is an easy report to try

report_definition = ReportDefinition(
    dimensions="marketingcloudvisitorid",
    metrics="visits",
    date_from=insertdate,
    date_to=insertdate,
    source="warehouse"
)