@mparticle/web-adobe-server-kit 2.1.0 → 2.1.2
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.
|
@@ -372,8 +372,15 @@ var Initialization = {
|
|
|
372
372
|
try {
|
|
373
373
|
// Init App Measurement with Visitor
|
|
374
374
|
var appMeasurement = new AppMeasurement(settings.reportSuiteIDs);
|
|
375
|
+
var visitorOptions = {};
|
|
376
|
+
if (settings.audienceManagerServer) {
|
|
377
|
+
visitorOptions.audienceManagerServer =
|
|
378
|
+
settings.audienceManagerServer;
|
|
379
|
+
}
|
|
380
|
+
|
|
375
381
|
appMeasurement.visitor = Visitor.getInstance(
|
|
376
|
-
settings.organizationID
|
|
382
|
+
settings.organizationID,
|
|
383
|
+
visitorOptions
|
|
377
384
|
);
|
|
378
385
|
appMeasurement.trackingServer = settings.trackingServer;
|
|
379
386
|
appMeasurement.account = settings.reportSuiteIDs;
|
|
@@ -653,8 +660,15 @@ var constructor$1 = function() {
|
|
|
653
660
|
try {
|
|
654
661
|
// On first load, adobe will call the callback correctly if no MCID exists
|
|
655
662
|
// On subsequent loads, it does not, so we need to manually call setMCIDOnIntegrationAttributes
|
|
663
|
+
var visitorOptions = {};
|
|
664
|
+
if (forwarderSettings.audienceManagerServer) {
|
|
665
|
+
visitorOptions.audienceManagerServer =
|
|
666
|
+
forwarderSettings.audienceManagerServer;
|
|
667
|
+
}
|
|
668
|
+
|
|
656
669
|
var mcID = Visitor.getInstance(
|
|
657
|
-
forwarderSettings.organizationID
|
|
670
|
+
forwarderSettings.organizationID,
|
|
671
|
+
visitorOptions
|
|
658
672
|
).getMarketingCloudVisitorID(setMarketingCloudId);
|
|
659
673
|
if (mcID && mcID.length > 0) {
|
|
660
674
|
setMCIDOnIntegrationAttributes(mcID);
|
|
@@ -373,8 +373,15 @@ var mParticleAdobe = (function () {
|
|
|
373
373
|
try {
|
|
374
374
|
// Init App Measurement with Visitor
|
|
375
375
|
var appMeasurement = new AppMeasurement(settings.reportSuiteIDs);
|
|
376
|
+
var visitorOptions = {};
|
|
377
|
+
if (settings.audienceManagerServer) {
|
|
378
|
+
visitorOptions.audienceManagerServer =
|
|
379
|
+
settings.audienceManagerServer;
|
|
380
|
+
}
|
|
381
|
+
|
|
376
382
|
appMeasurement.visitor = Visitor.getInstance(
|
|
377
|
-
settings.organizationID
|
|
383
|
+
settings.organizationID,
|
|
384
|
+
visitorOptions
|
|
378
385
|
);
|
|
379
386
|
appMeasurement.trackingServer = settings.trackingServer;
|
|
380
387
|
appMeasurement.account = settings.reportSuiteIDs;
|
|
@@ -654,8 +661,15 @@ var mParticleAdobe = (function () {
|
|
|
654
661
|
try {
|
|
655
662
|
// On first load, adobe will call the callback correctly if no MCID exists
|
|
656
663
|
// On subsequent loads, it does not, so we need to manually call setMCIDOnIntegrationAttributes
|
|
664
|
+
var visitorOptions = {};
|
|
665
|
+
if (forwarderSettings.audienceManagerServer) {
|
|
666
|
+
visitorOptions.audienceManagerServer =
|
|
667
|
+
forwarderSettings.audienceManagerServer;
|
|
668
|
+
}
|
|
669
|
+
|
|
657
670
|
var mcID = Visitor.getInstance(
|
|
658
|
-
forwarderSettings.organizationID
|
|
671
|
+
forwarderSettings.organizationID,
|
|
672
|
+
visitorOptions
|
|
659
673
|
).getMarketingCloudVisitorID(setMarketingCloudId);
|
|
660
674
|
if (mcID && mcID.length > 0) {
|
|
661
675
|
setMCIDOnIntegrationAttributes(mcID);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mparticle/web-adobe-server-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "mParticle integration sdk for Adobe (server side)",
|
|
5
5
|
"main": "dist/AdobeServerSideKit.common.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-adobe/tree/master/packages/AdobeServer",
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "65cc56d8c1a2caa0a2fc412eefd93b7073211fbd"
|
|
16
16
|
}
|
|
@@ -24,12 +24,14 @@ var MessageType = {
|
|
|
24
24
|
};
|
|
25
25
|
var name = 'Adobe',
|
|
26
26
|
MARKETINGCLOUDIDKEY = 'mid',
|
|
27
|
-
ADOBEMODULENUMBER = 124
|
|
27
|
+
ADOBEMODULENUMBER = 124,
|
|
28
|
+
suffix = 'Server';
|
|
28
29
|
|
|
29
30
|
var constructor = function() {
|
|
30
31
|
var self = this,
|
|
31
32
|
isAdobeServerKitInitialized;
|
|
32
33
|
self.name = name;
|
|
34
|
+
self.suffix = suffix;
|
|
33
35
|
self.adobeMediaSDK = new AdobeHbkConstructor();
|
|
34
36
|
|
|
35
37
|
function initForwarder(forwarderSettings, service, testMode) {
|
|
@@ -37,8 +39,15 @@ var constructor = function() {
|
|
|
37
39
|
try {
|
|
38
40
|
// On first load, adobe will call the callback correctly if no MCID exists
|
|
39
41
|
// On subsequent loads, it does not, so we need to manually call setMCIDOnIntegrationAttributes
|
|
42
|
+
var visitorOptions = {};
|
|
43
|
+
if (forwarderSettings.audienceManagerServer) {
|
|
44
|
+
visitorOptions.audienceManagerServer =
|
|
45
|
+
forwarderSettings.audienceManagerServer;
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
var mcID = Visitor.getInstance(
|
|
41
|
-
forwarderSettings.organizationID
|
|
49
|
+
forwarderSettings.organizationID,
|
|
50
|
+
visitorOptions
|
|
42
51
|
).getMarketingCloudVisitorID(setMarketingCloudId);
|
|
43
52
|
if (mcID && mcID.length > 0) {
|
|
44
53
|
setMCIDOnIntegrationAttributes(mcID);
|
|
@@ -93,15 +102,18 @@ function getId() {
|
|
|
93
102
|
if (window && window.mParticle && window.mParticle.addForwarder) {
|
|
94
103
|
window.mParticle.addForwarder({
|
|
95
104
|
name: name,
|
|
105
|
+
suffix: suffix,
|
|
96
106
|
constructor: constructor,
|
|
97
107
|
getId: getId
|
|
98
108
|
});
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
function register(config) {
|
|
112
|
+
var forwarderNameWithSuffix = [name, suffix].join('-');
|
|
102
113
|
if (!config) {
|
|
103
114
|
window.console.log(
|
|
104
|
-
'You must pass a config object to register the kit ' +
|
|
115
|
+
'You must pass a config object to register the kit ' +
|
|
116
|
+
forwarderNameWithSuffix
|
|
105
117
|
);
|
|
106
118
|
return;
|
|
107
119
|
}
|
|
@@ -114,17 +126,19 @@ function register(config) {
|
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
if (isObject(config.kits)) {
|
|
117
|
-
config.kits[
|
|
129
|
+
config.kits[forwarderNameWithSuffix] = {
|
|
118
130
|
constructor: constructor
|
|
119
131
|
};
|
|
120
132
|
} else {
|
|
121
133
|
config.kits = {};
|
|
122
|
-
config.kits[
|
|
134
|
+
config.kits[forwarderNameWithSuffix] = {
|
|
123
135
|
constructor: constructor
|
|
124
136
|
};
|
|
125
137
|
}
|
|
126
138
|
window.console.log(
|
|
127
|
-
'Successfully registered ' +
|
|
139
|
+
'Successfully registered ' +
|
|
140
|
+
forwarderNameWithSuffix +
|
|
141
|
+
' to your mParticle configuration'
|
|
128
142
|
);
|
|
129
143
|
}
|
|
130
144
|
|