@mparticle/web-id5-kit 1.0.1 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1035,6 +1035,7 @@ Common.prototype.logId5Id = function (id5Id) {
1035
1035
  var integrationAttributes = {
1036
1036
  encryptedId5Id: id5Id,
1037
1037
  id5IdType: this.id5IdType,
1038
+ partnerId: this.partnerId.toString(),
1038
1039
  };
1039
1040
 
1040
1041
  window.mParticle.setIntegrationAttribute(this.moduleId, integrationAttributes);
@@ -1264,7 +1265,13 @@ IdentityHandler.prototype.onLoginComplete = function(
1264
1265
  var partnerData = this.common.buildPartnerData(mParticleUser);
1265
1266
 
1266
1267
  if (partnerData) {
1267
- var id5Instance = window.ID5.init({partnerId: this.common.partnerId, pd: partnerData});
1268
+ var id5Instance = window.ID5.init({
1269
+ partnerId: this.common.partnerId,
1270
+ pd: partnerData,
1271
+ consentData: {
1272
+ allowedVendors: this.common.allowedVendors
1273
+ }
1274
+ });
1268
1275
  var logId5Id = this.common.logId5Id;
1269
1276
 
1270
1277
  id5Instance.onAvailable(function(status){
@@ -1276,7 +1283,12 @@ IdentityHandler.prototype.onLoginComplete = function(
1276
1283
  //Must re-initialize ID5 without partner identities (pd) in the config to revert to an anonymous ID5 ID
1277
1284
  IdentityHandler.prototype.onLogoutComplete = function(
1278
1285
  ) {
1279
- var id5Instance = window.ID5.init({partnerId: this.common.partnerId});
1286
+ var id5Instance = window.ID5.init({
1287
+ partnerId: this.common.partnerId,
1288
+ consentData: {
1289
+ allowedVendors: this.common.allowedVendors
1290
+ }
1291
+ });
1280
1292
  var logId5Id = this.common.logId5Id;
1281
1293
 
1282
1294
  id5Instance.onAvailable(function(status){
@@ -1296,7 +1308,8 @@ var identityHandler = IdentityHandler;
1296
1308
 
1297
1309
  var initialization = {
1298
1310
  name: 'ID5',
1299
- moduleId: '248',
1311
+ moduleId: 248,
1312
+ vendors: [ '131', 'ID5-1747' ],
1300
1313
  /* ****** Fill out initForwarder to load your SDK ******
1301
1314
  Note that not all arguments may apply to your SDK initialization.
1302
1315
  These are passed from mParticle, but leave them even if they are not being used.
@@ -1310,6 +1323,7 @@ var initialization = {
1310
1323
  common.partnerId = forwarderSettings.partnerId;
1311
1324
  common.id5IdType = forwarderSettings.id5IdType;
1312
1325
  common.moduleId = this.moduleId;
1326
+ common.allowedVendors = this.vendors;
1313
1327
 
1314
1328
  if (!testMode) {
1315
1329
  /* Load your Web SDK here using a variant of your snippet from your readme that your customers would generally put into their <head> tags
@@ -1322,7 +1336,12 @@ var initialization = {
1322
1336
 
1323
1337
  id5Script.onload = function() {
1324
1338
 
1325
- var id5Instance = window.ID5.init({partnerId: common.partnerId});
1339
+ var id5Instance = window.ID5.init({
1340
+ partnerId: common.partnerId,
1341
+ consentData: {
1342
+ allowedVendors: common.allowedVendors
1343
+ }
1344
+ });
1326
1345
 
1327
1346
  id5Instance.onAvailable(function(status){
1328
1347
  common.logId5Id(status.getUserId());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mparticle/web-id5-kit",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "main": "dist/ID5Kit.common.js",
5
5
  "files": [
6
6
  "dist/ID5Kit.common.js"