Skip to content

Commit

Permalink
Fix: Include allowedVendor param and update ModuleId value
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Murphy committed Dec 11, 2024
1 parent 1797c75 commit 639ba47
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 12 deletions.
24 changes: 20 additions & 4 deletions dist/ID5Kit.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,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: [ '131', 'ID5-1747' ]
}
});
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand All @@ -1276,7 +1282,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: [ '131', 'ID5-1747' ]
}
});
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand All @@ -1296,7 +1307,7 @@ var identityHandler = IdentityHandler;

var initialization = {
name: 'ID5',
moduleId: '248',
moduleId: 248,
/* ****** 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 All @@ -1322,7 +1333,12 @@ var initialization = {

id5Script.onload = function() {

var id5Instance = window.ID5.init({partnerId: common.partnerId});
var id5Instance = window.ID5.init({
partnerId: common.partnerId,
consentData: {
allowedVendors: [ '131', 'ID5-1747' ]
}
});

id5Instance.onAvailable(function(status){
common.logId5Id(status.getUserId());
Expand Down
24 changes: 20 additions & 4 deletions dist/ID5Kit.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,13 @@ var ID5Kit = (function (exports) {
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: [ '131', 'ID5-1747' ]
}
});
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand All @@ -1275,7 +1281,12 @@ var ID5Kit = (function (exports) {
//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: [ '131', 'ID5-1747' ]
}
});
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand All @@ -1295,7 +1306,7 @@ var ID5Kit = (function (exports) {

var initialization = {
name: 'ID5',
moduleId: '248',
moduleId: 248,
/* ****** 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 All @@ -1321,7 +1332,12 @@ var ID5Kit = (function (exports) {

id5Script.onload = function() {

var id5Instance = window.ID5.init({partnerId: common.partnerId});
var id5Instance = window.ID5.init({
partnerId: common.partnerId,
consentData: {
allowedVendors: [ '131', 'ID5-1747' ]
}
});

id5Instance.onAvailable(function(status){
common.logId5Id(status.getUserId());
Expand Down
15 changes: 13 additions & 2 deletions src/identity-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [ '131', 'ID5-1747' ]
}

Check failure on line 39 in src/identity-handler.js

View workflow job for this annotation

GitHub Actions / Run Web Kit PR Workflow / Build and Test

Expected indentation of 12 spaces but found 14
})
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand All @@ -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: [ '131', 'ID5-1747' ]
}

Check failure on line 56 in src/identity-handler.js

View workflow job for this annotation

GitHub Actions / Run Web Kit PR Workflow / Build and Test

Expected indentation of 8 spaces but found 10
})
var logId5Id = this.common.logId5Id;

id5Instance.onAvailable(function(status){
Expand Down
9 changes: 7 additions & 2 deletions src/initialization.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var initialization = {
name: 'ID5',
moduleId: '248',
moduleId: 248,
/* ****** 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 All @@ -27,7 +27,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: [ '131', 'ID5-1747' ]
}

Check failure on line 34 in src/initialization.js

View workflow job for this annotation

GitHub Actions / Run Web Kit PR Workflow / Build and Test

Expected indentation of 20 spaces but found 22
})

id5Instance.onAvailable(function(status){
common.logId5Id(status.getUserId());
Expand Down

0 comments on commit 639ba47

Please sign in to comment.