These instructions are for Target customers who want to use the Experience Cloud Identity Service and do not use Dynamic Tag Management (DTM). However, we strongly recommend that you use DTM to implement the ID service. DTM streamlines the implementation workflow and automatically ensures the correct code placement and sequencing.
The ID Service requires the
VisitorAPI.js code library. Contact Customer Care to get this code.
Part 1: Copy the Visitor.getInstance function below
var visitor = Visitor.getInstance("INSERT-MARKETING-CLOUD-ORGANIZATION ID-HERE");
Part 2: Add function code to the VisitorAPI.js file
Visitor.getInstance function at the end of the file after the code block. Your edited file should look like this:
/* ========== DO NOT ALTER ANYTHING BELOW THIS LINE ========== Version and copyright section */ // Visitor API code library section // Put Visitor.getInstance at the end of the file, after the code library var visitor = Visitor.getInstance("INSERT-MARKETING-CLOUD-ORGANIZATION ID-HERE");
Visitor.getInstance function, replace
INSERT-MARKETING-CLOUD-ORGANIZATION ID-HERE with your Experience Cloud organization ID. If you do not know your organization ID, you can find it on the Experience Cloud administration page. See also, Administration - Core Services. Your edited function could look similar to the example below.
var visitor = Visitor.getInstance("1234567ABC@AdobeOrg");
Do not change the case of the characters in your organization ID. The ID is case-sensitive and must be used exactly as provided.
VisitorAPI.js file to your site in the
<head> tags before the reference to the
mbox.js file. The Experience Cloud ID service must execute before the first Target network call is generated. Move this code into production after testing and verification.
You can test and deploy as follows.
Test and verify
To test your ID service implementation:
mboxMCGVIDappears in your Target request and that it contains the Experience Cloud ID (MID).
See Cookies and the Experience Cloud Identity Service for information about the AMCV cookie and the MID.
Deploy your code after it passes testing.