@mparticle/web-device-match-kit 2.0.0-rc.2 → 3.1.0
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.
- package/dist/DeviceMatchEventForwarder.common.js +91 -79
- package/package.json +39 -25
|
@@ -35,102 +35,114 @@ var isobject$1 = getCjsExportFromNamespace(isobject);
|
|
|
35
35
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
36
36
|
// See the License for the specific language governing permissions and
|
|
37
37
|
// limitations under the License.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var name = 'DeviceMatchEventForwarder',
|
|
41
|
-
moduleId = 109;
|
|
42
|
-
|
|
43
|
-
var constructor = function () {
|
|
44
|
-
var self = this,
|
|
45
|
-
isInitialized = false,
|
|
46
|
-
forwarderSettings = null;
|
|
47
|
-
|
|
48
|
-
self.name = name;
|
|
49
|
-
|
|
50
|
-
function initForwarder(settings,
|
|
51
|
-
service,
|
|
52
|
-
testMode,
|
|
53
|
-
sendForwardingStats,
|
|
54
|
-
temp,
|
|
55
|
-
temp1,
|
|
56
|
-
userAttributes,
|
|
57
|
-
userIdentities,
|
|
58
|
-
appVersion,
|
|
59
|
-
appName,
|
|
60
|
-
customFlags,
|
|
61
|
-
clientId) {
|
|
62
|
-
|
|
63
|
-
forwarderSettings = settings;
|
|
64
|
-
|
|
65
|
-
try {
|
|
66
|
-
if(!testMode) {
|
|
67
|
-
var partnerId = forwarderSettings.partnerId,
|
|
68
|
-
url = 'https://tapestry.tapad.com/tapestry/1?ta_partner_id=' + partnerId + ' &ta_partner_did=' + clientId + '&ta_format=png;',
|
|
69
|
-
body = document.getElementsByTagName('body')[0],
|
|
70
|
-
noscript = document.createElement('noscript'),
|
|
71
|
-
img = document.createElement('img');
|
|
72
|
-
|
|
73
|
-
img.src = url;
|
|
74
|
-
img.style.display = 'none';
|
|
75
|
-
img.setAttribute('height', '1');
|
|
76
|
-
img.setAttribute('width', '1');
|
|
77
|
-
|
|
78
|
-
noscript.appendChild(img);
|
|
79
|
-
|
|
80
|
-
body.appendChild(noscript);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
isInitialized = true;
|
|
84
|
-
return 'Successfully initialized: ' + self.name;
|
|
85
38
|
|
|
39
|
+
|
|
40
|
+
var name = 'DeviceMatchEventForwarder',
|
|
41
|
+
moduleId = 109;
|
|
42
|
+
|
|
43
|
+
var constructor = function() {
|
|
44
|
+
var self = this,
|
|
45
|
+
isInitialized = false,
|
|
46
|
+
forwarderSettings = null;
|
|
47
|
+
|
|
48
|
+
self.name = name;
|
|
49
|
+
|
|
50
|
+
function initForwarder(
|
|
51
|
+
settings,
|
|
52
|
+
service,
|
|
53
|
+
testMode,
|
|
54
|
+
sendForwardingStats,
|
|
55
|
+
temp,
|
|
56
|
+
temp1,
|
|
57
|
+
userAttributes,
|
|
58
|
+
userIdentities,
|
|
59
|
+
appVersion,
|
|
60
|
+
appName,
|
|
61
|
+
customFlags,
|
|
62
|
+
clientId
|
|
63
|
+
) {
|
|
64
|
+
forwarderSettings = settings;
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
if (!testMode) {
|
|
68
|
+
var partnerId = forwarderSettings.partnerId,
|
|
69
|
+
url =
|
|
70
|
+
'https://tapestry.tapad.com/tapestry/1?ta_partner_id=' +
|
|
71
|
+
partnerId +
|
|
72
|
+
' &ta_partner_did=' +
|
|
73
|
+
clientId +
|
|
74
|
+
'&ta_format=png;',
|
|
75
|
+
body = document.getElementsByTagName('body')[0],
|
|
76
|
+
noscript = document.createElement('noscript'),
|
|
77
|
+
img = document.createElement('img');
|
|
78
|
+
|
|
79
|
+
img.src = url;
|
|
80
|
+
img.style.display = 'none';
|
|
81
|
+
img.setAttribute('height', '1');
|
|
82
|
+
img.setAttribute('width', '1');
|
|
83
|
+
|
|
84
|
+
noscript.appendChild(img);
|
|
85
|
+
|
|
86
|
+
body.appendChild(noscript);
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
|
|
89
|
+
isInitialized = true;
|
|
90
|
+
return 'Successfully initialized: ' + self.name;
|
|
91
|
+
} catch (e) {
|
|
92
|
+
return "Can't initialize forwarder: " + self.name + ': ' + e;
|
|
90
93
|
}
|
|
94
|
+
}
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
this.init = initForwarder;
|
|
97
|
+
};
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
function getId() {
|
|
100
|
+
return moduleId;
|
|
101
|
+
}
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
function register(config) {
|
|
104
|
+
if (!config) {
|
|
105
|
+
console.log(
|
|
106
|
+
'You must pass a config object to register the kit ' + name
|
|
107
|
+
);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
104
110
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
if (!isobject$1(config)) {
|
|
112
|
+
console.log(
|
|
113
|
+
"'config' must be an object. You passed in a " + typeof config
|
|
114
|
+
);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
109
117
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
window.console.log('Successfully registered ' + name + ' to your mParticle configuration');
|
|
118
|
+
if (isobject$1(config.kits)) {
|
|
119
|
+
config.kits[name] = {
|
|
120
|
+
constructor: constructor,
|
|
121
|
+
};
|
|
122
|
+
} else {
|
|
123
|
+
config.kits = {};
|
|
124
|
+
config.kits[name] = {
|
|
125
|
+
constructor: constructor,
|
|
126
|
+
};
|
|
121
127
|
}
|
|
128
|
+
console.log(
|
|
129
|
+
'Successfully registered ' + name + ' to your mParticle configuration'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
122
132
|
|
|
133
|
+
if (typeof window !== 'undefined') {
|
|
123
134
|
if (window && window.mParticle && window.mParticle.addForwarder) {
|
|
124
135
|
window.mParticle.addForwarder({
|
|
125
136
|
name: name,
|
|
126
137
|
constructor: constructor,
|
|
127
|
-
getId: getId
|
|
138
|
+
getId: getId,
|
|
128
139
|
});
|
|
129
140
|
}
|
|
141
|
+
}
|
|
130
142
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
var DeviceMatchEventForwarder = {
|
|
144
|
+
register: register,
|
|
145
|
+
};
|
|
134
146
|
var DeviceMatchEventForwarder_1 = DeviceMatchEventForwarder.register;
|
|
135
147
|
|
|
136
148
|
exports.default = DeviceMatchEventForwarder;
|
package/package.json
CHANGED
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
"name": "@mparticle/web-device-match-kit",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
|
|
5
|
+
"description": "mParticle integration sdk for Device Match",
|
|
6
|
+
"main": "dist/DeviceMatchEventForwarder.common.js",
|
|
7
|
+
"browser": "dist/DeviceMatchEventForwarder.common.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/DeviceMatchEventForwarder.common.js"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/mParticle/mparticle-web-sdk",
|
|
14
|
+
"directory": "kits/device-match"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rollup --config rollup.config.js",
|
|
18
|
+
"watch": "rollup --config rollup.config.js -w",
|
|
19
|
+
"test": "node test/boilerplate/test-karma.js"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"chai": "^4.2.0",
|
|
23
|
+
"karma": "^5.1.0",
|
|
24
|
+
"karma-chai": "^0.1.0",
|
|
25
|
+
"karma-chrome-launcher": "^3.1.0",
|
|
26
|
+
"karma-firefox-launcher": "^1.3.0",
|
|
27
|
+
"karma-mocha": "^2.0.1",
|
|
28
|
+
"mocha": "^2.5.3",
|
|
29
|
+
"rollup": "^1.13.1",
|
|
30
|
+
"rollup-plugin-commonjs": "^10.0.0",
|
|
31
|
+
"rollup-plugin-node-resolve": "^5.0.1",
|
|
32
|
+
"shelljs": "^0.8.4",
|
|
33
|
+
"should": "^7.1.0",
|
|
34
|
+
"watchify": "^3.11.1"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"isobject": "^4.0.0",
|
|
38
|
+
"@mparticle/web-sdk": "^3.0.0"
|
|
39
|
+
},
|
|
40
|
+
"license": "Apache-2.0"
|
|
27
41
|
}
|