With Regards to using new Append Visitor Id Helper function in DTM , Let's take an example where There is a company called Food Company and have two website i.e. Pizza website (www.pizza.com) & Taco's website (www.tacoz.com) and we want to implement Visitor ID helper function on domain www.pizza.com such that as a visitor browses to www.tacoz.com after clicking a link on Pizza website , the visitor.appendVisitorIDsTo(url) appends the MID as a query parameter in the URL redirect from the to the tacoz.com domain.The ID service code on the destination domain extracts the MID from the URL instead of sending a request to Adobe for a new ID. The ID service code on the destination page uses the passed-in MID to track the visitor.
Hence please add the following code in "Customize Page code" section of Adobe Analytics Tool in DTM implementation of "www.pizza.com" .
var domainB="www.tacoz.com"; var domainBWithVisitorIDs = _satellite.getVisitorId().appendVisitorIDsTo(domainB); document.getElementById("link2").setAttribute("href", "http://" + domainBWithVisitorIDs);
//link2 is the id of a link on Pizza Website
Please Note: for Append Visitor Id's function, you must own the source and destination domains and have the ID service implemented on both domains. Available in VisitorAPI.js version 1.7.0 or higher.