diff --git a/src/identity-handler.js b/src/identity-handler.js index 477025f..6828546 100644 --- a/src/identity-handler.js +++ b/src/identity-handler.js @@ -31,7 +31,13 @@ IdentityHandler.prototype.onLoginComplete = function( var partnerData = this.common.buildPartnerData(mParticleUser); if (partnerData) { - var id5Instance = window.ID5.init({partnerId: this.common.partnerId, pd: partnerData}) + var id5Instance = window.ID5.init({ + partnerId: this.common.partnerId, + pd: partnerData, + consentData: { + allowedVendors: this.common.allowedVendors + } + }) var logId5Id = this.common.logId5Id; id5Instance.onAvailable(function(status){ @@ -43,7 +49,12 @@ IdentityHandler.prototype.onLoginComplete = function( //Must re-initialize ID5 without partner identities (pd) in the config to revert to an anonymous ID5 ID IdentityHandler.prototype.onLogoutComplete = function( ) { - var id5Instance = window.ID5.init({partnerId: this.common.partnerId}) + var id5Instance = window.ID5.init({ + partnerId: this.common.partnerId, + consentData: { + allowedVendors: this.common.allowedVendors + } + }) var logId5Id = this.common.logId5Id; id5Instance.onAvailable(function(status){ diff --git a/src/initialization.js b/src/initialization.js index 8f79565..ba6a140 100644 --- a/src/initialization.js +++ b/src/initialization.js @@ -1,6 +1,7 @@ var initialization = { name: 'ID5', - moduleId: '248', + moduleId: 248, + vendors: [ '131', 'ID5-1747' ], /* ****** Fill out initForwarder to load your SDK ****** Note that not all arguments may apply to your SDK initialization. These are passed from mParticle, but leave them even if they are not being used. @@ -14,6 +15,7 @@ var initialization = { common.partnerId = forwarderSettings.partnerId; common.id5IdType = forwarderSettings.id5IdType; common.moduleId = this.moduleId; + common.allowedVendors = this.vendors; if (!testMode) { /* Load your Web SDK here using a variant of your snippet from your readme that your customers would generally put into their tags @@ -27,7 +29,12 @@ var initialization = { id5Script.onload = function() { isInitialized = true; - var id5Instance = window.ID5.init({partnerId: common.partnerId}) + var id5Instance = window.ID5.init({ + partnerId: common.partnerId, + consentData: { + allowedVendors: common.allowedVendors + } + }) id5Instance.onAvailable(function(status){ common.logId5Id(status.getUserId());