Skip to content

Instantly share code, notes, and snippets.

@matthewadowns
Last active August 29, 2015 14:24
Show Gist options
  • Save matthewadowns/f9a6f4de808d51b2f432 to your computer and use it in GitHub Desktop.
Save matthewadowns/f9a6f4de808d51b2f432 to your computer and use it in GitHub Desktop.
For use with AppMeasurement.js or s_code.js --a snippet to map the Adobe Marketing Cloud Visitor ID to itself with an alias name for Customer Attributes.
/**
* Supports Demandbase Customer Attributes integration
* Map the MCVID to itself via the alias "demandbase"
*/
(function(){
function map_mcvid(retry) {
var mcvid = visitor.getMarketingCloudVisitorID();
if (mcvid) {
visitor.setCustomerIDs({ "demandbase": mcvid });
//Optional - send to Conversion Variable: s.eVar# = mcvid;
} else if (retry) {
window.setTimeout(function() { map_mcvid(false) }, 1200);
}
}
map_mcvid(true);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment