Implement the Adobe Visitor ID Service for Target implement-the-experience-cloud-id-service-for-target

These instructions are for Target customers who want to use the Visitor ID Service and do not use tags. However, we strongly recommend that you use tags to implement the Visitor ID Service. Tags streamlines the implementation workflow and automatically ensures the correct code placement and sequencing.

IMPORTANT
  • Read the requirements before you begin.
  • Configure and test this code in a development environment before implementing it in production.

Step 1: Get the Visitor ID Service code section-b32ba0548aa546a79dd38be59832a53e

The Visitor ID Service requires the VisitorAPI.js code library. Contact Customer Care to get this code.

Step 2: Add the Visitor.getInstance function to the Visitor ID Service code section-287ef2958e9f43858fe9d630ae519e22

Part 1: Copy the Visitor.getInstance function below

var visitor = Visitor.getInstance("INSERT-IMS-ORG-ID-HERE");

Part 2: Add function code to the VisitorAPI.js file

Place the 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-IMS-ORG-ID-HERE");

Step 3: Add your IMS org ID to Visitor.getInstance section-522b1877be9243c39b222859b821f0ce

In the Visitor.getInstance function, replace INSERT-IMS-ORG-ID-HERE with your IMS org ID. If you do not know your IMS org ID, you can find it on the CX Enterprise administration page. See also, Administration - Core Services. Your edited function could look similar to the example below.

var visitor = Visitor.getInstance("1234567ABC@AdobeOrg");

IMPORTANT
Do not change the case of the characters in your IMS org ID. The ID is case-sensitive and must be used exactly as provided.

Step 4: Add Visitor API code to the page section-02d8dd7678b64a85b5abc1c4ef0845dd

Deploy the VisitorAPI.js file to your site in the <head> tags before the reference to the mbox.js file. The Visitor ID Service must execute before the first Target network call is generated. Move this code into production after testing and verification.

Step 5: Test and deploy Visitor ID Service code section-e81ee439bb8a4c2abea43d76f3112e9c

You can test and deploy as follows.

Test and verify

To test your Visitor ID Service implementation:

  • Check for the AMCV cookie in the domain where your page is hosted.
  • Verify mboxMCGVID appears in your Target request and that it contains the ECID.

See Cookies and the Visitor ID Service for information about the AMCV cookie and the MID.

Deploy

Deploy your code after it passes testing.

recommendation-more-help
id-service-help