Skip to content

Instantly share code, notes, and snippets.

@matthewadowns
Last active August 29, 2015 14:21
Show Gist options
  • Save matthewadowns/ec3be9569e3b00192ae4 to your computer and use it in GitHub Desktop.
Save matthewadowns/ec3be9569e3b00192ae4 to your computer and use it in GitHub Desktop.
For use with Adobe DTM --a snippet to map the Adobe Marketing Cloud Visitor ID to itself with an alias name for Customer Attributes.
(function(){
function map_mcvid(retry) {
var sat = window._satellite;
if('undefined' !== typeof sat && sat.getVisitorId()) {
var mcvid = sat.getVisitorId().getMarketingCloudVisitorID();
if (mcvid) {
sat.getVisitorId().setCustomerIDs({ "demandbase": mcvid });
} else if (retry) {
window.setTimeout(function() { map_mcvid(false) }, 1000);
}
}
}
map_mcvid(true);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment