Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Downs theUtherSide

View GitHub Profile
@theUtherSide
theUtherSide / Map_Adobe_MCVID.js
Last active Aug 29, 2015
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.
View Map_Adobe_MCVID.js
/**
* 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;
@theUtherSide
theUtherSide / Map_Adobe_MCVID_DTM.js
Last active Aug 29, 2015
For use with Adobe DTM --a snippet to map the Adobe Marketing Cloud Visitor ID to itself with an alias name for Customer Attributes.
View Map_Adobe_MCVID_DTM.js
(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);
}
View gist:3101363
<result>
<company-name>Advance Magazine Publishers</company-name>
<demandbase-sid type="integer">1334313</demandbase-sid>
<audience>Enterprise Business</audience>
<audience-segment>Media & Entertainment</audience-segment>
<industry>Media & Entertainment</industry>
<sub-industry>Publisher</sub-industry>
<company-size>Over $5B</company-size>
<employee-count type="integer">37200</employee-count>
<isp type="boolean">false</isp>
You can’t perform that action at this time.