Last active
August 29, 2015 14:21
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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