Last active
August 29, 2015 14:24
-
-
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.
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
/** | |
* 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