Skip to content

Commit

Permalink
Add usage of global vendor variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Murphy committed Dec 18, 2024
1 parent bc1b6aa commit 4db85fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/identity-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ For more userIdentity types, see https://docs.mparticle.com/developers/sdk/web/i

function IdentityHandler(common) {
this.common = common || {};
this.allowedVendors = [ '131', 'ID5-1747' ];
}
IdentityHandler.prototype.onUserIdentified = function() {};
IdentityHandler.prototype.onIdentifyComplete = function() {};
Expand All @@ -35,7 +36,7 @@ IdentityHandler.prototype.onLoginComplete = function(
partnerId: this.common.partnerId,
pd: partnerData,
consentData: {
allowedVendors: [ '131', 'ID5-1747' ]
allowedVendors: this.allowedVendors
}
})
var logId5Id = this.common.logId5Id;
Expand All @@ -52,7 +53,7 @@ IdentityHandler.prototype.onLogoutComplete = function(
var id5Instance = window.ID5.init({
partnerId: this.common.partnerId,
consentData: {
allowedVendors: [ '131', 'ID5-1747' ]
allowedVendors: this.allowedVendors
}
})
var logId5Id = this.common.logId5Id;
Expand Down
3 changes: 2 additions & 1 deletion src/initialization.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var initialization = {
name: 'ID5',
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.
Expand Down Expand Up @@ -30,7 +31,7 @@ var initialization = {
var id5Instance = window.ID5.init({
partnerId: common.partnerId,
consentData: {
allowedVendors: [ '131', 'ID5-1747' ]
allowedVendors: this.vendors
}
})

Expand Down

0 comments on commit 4db85fd

Please sign in to comment.