@mparticle/web-amplitude-kit 2.2.1 → 2.3.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/Amplitude.common.js +34 -35
- package/package.json +43 -42
package/dist/Amplitude.common.js
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
/*!
|
|
4
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
7
|
-
* Released under the MIT License.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
function isObject(val) {
|
|
11
|
-
return val != null && typeof val === 'object' && Array.isArray(val) === false;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
3
|
/* eslint-disable no-undef*/
|
|
15
4
|
//
|
|
16
5
|
// Copyright 2015 mParticle, Inc.
|
|
@@ -27,8 +16,6 @@ function isObject(val) {
|
|
|
27
16
|
// See the License for the specific language governing permissions and
|
|
28
17
|
// limitations under the License.
|
|
29
18
|
|
|
30
|
-
|
|
31
|
-
|
|
32
19
|
var name = 'Amplitude',
|
|
33
20
|
moduleId = 53,
|
|
34
21
|
MessageType = {
|
|
@@ -72,29 +59,33 @@ var includeIndividualProductEvents,
|
|
|
72
59
|
/* eslint-disable */
|
|
73
60
|
// prettier-ignore
|
|
74
61
|
var renderSnippet = function() {
|
|
75
|
-
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
;function s(e,t){e.prototype[t]=function(){
|
|
62
|
+
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script");
|
|
63
|
+
r.type="text/javascript";
|
|
64
|
+
r.integrity="sha384-QahB0HKETlcqjneomU3Ohs+UgJTinhUNFIKJitEl2Vo7DjvphO2jei64ZP5J2GA5";
|
|
65
|
+
r.crossOrigin="anonymous";r.async=true;
|
|
66
|
+
r.src="https://cdn.amplitude.com/libs/amplitude-8.21.8-min.gz.js";
|
|
67
|
+
r.onload=function(){if(!e.amplitude.runQueuedFunctions){console.log(
|
|
68
|
+
"[Amplitude] Error: could not load SDK");}};var s=t.getElementsByTagName("script"
|
|
69
|
+
)[0];s.parentNode.insertBefore(r,s);function i(e,t){e.prototype[t]=function(){
|
|
84
70
|
this._q.push([t].concat(Array.prototype.slice.call(arguments,0)));return this};}
|
|
85
|
-
var o=function(){this._q=[];return this}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
;var l=[
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
;e
|
|
71
|
+
var o=function(){this._q=[];return this};var a=["add","append","clearAll",
|
|
72
|
+
"prepend","set","setOnce","unset","preInsert","postInsert","remove"];for(
|
|
73
|
+
var c=0;c<a.length;c++){i(o,a[c]);}n.Identify=o;var l=function(){this._q=[];
|
|
74
|
+
return this};var p=["setProductId","setQuantity","setPrice","setRevenueType",
|
|
75
|
+
"setEventProperties"];for(var u=0;u<p.length;u++){i(l,p[u]);}n.Revenue=l;var d=[
|
|
76
|
+
"init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut",
|
|
77
|
+
"setVersionName","setDomain","setDeviceId","enableTracking",
|
|
78
|
+
"setGlobalUserProperties","identify","clearUserProperties","setGroup",
|
|
79
|
+
"logRevenueV2","regenerateDeviceId","groupIdentify","onInit","onNewSessionStart"
|
|
80
|
+
,"logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId",
|
|
81
|
+
"getDeviceId","getUserId","setMinTimeBetweenSessionsMillis",
|
|
82
|
+
"setEventUploadThreshold","setUseDynamicConfig","setServerZone","setServerUrl",
|
|
83
|
+
"sendEvents","setLibrary","setTransport"];function v(t){function e(e){t[e
|
|
84
|
+
]=function(){t._q.push([e].concat(Array.prototype.slice.call(arguments,0)));};}
|
|
85
|
+
for(var n=0;n<d.length;n++){e(d[n]);}}v(n);n.getInstance=function(e){e=(
|
|
86
|
+
!e||e.length===0?"$default_instance":e).toLowerCase();if(
|
|
87
|
+
!Object.prototype.hasOwnProperty.call(n._iq,e)){n._iq[e]={_q:[]};v(n._iq[e]);}
|
|
88
|
+
return n._iq[e]};e.amplitude=n;})(window,document);
|
|
98
89
|
/* eslint-enable */
|
|
99
90
|
};
|
|
100
91
|
|
|
@@ -747,6 +738,14 @@ function getId() {
|
|
|
747
738
|
return moduleId;
|
|
748
739
|
}
|
|
749
740
|
|
|
741
|
+
function isObject(val) {
|
|
742
|
+
return (
|
|
743
|
+
val != null &&
|
|
744
|
+
typeof val === 'object' &&
|
|
745
|
+
Array.isArray(val) === false
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
|
|
750
749
|
function register(config) {
|
|
751
750
|
if (!config) {
|
|
752
751
|
console.log(
|
package/package.json
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
2
|
+
"name": "@mparticle/web-amplitude-kit",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
|
|
5
|
+
"description": "mParticle integration sdk for Amplitude",
|
|
6
|
+
"main": "dist/Amplitude.common.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/Amplitude.common.js"
|
|
9
|
+
],
|
|
10
|
+
"repository": "https://github.com/mparticle-integrations/mparticle-javascript-integration-amplitude",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rollup --config rollup.config.js",
|
|
13
|
+
"build:test": "rollup --config rollup.test.config.js",
|
|
14
|
+
"test": "npm run build && npm run build:test && DEBUG=false karma start test/karma.config.js",
|
|
15
|
+
"test:debug": "npm run build && npm run build:test && DEBUG=true karma start test/karma.config.js",
|
|
16
|
+
"watch": "rollup --config rollup.config.js -w"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@mparticle/web-sdk": "^2.12.8",
|
|
20
|
+
"@semantic-release/changelog": "^5.0.1",
|
|
21
|
+
"@semantic-release/exec": "^5.0.0",
|
|
22
|
+
"@semantic-release/git": "^9.0.0",
|
|
23
|
+
"chai": "^4.2.0",
|
|
24
|
+
"eslint-config-prettier": "6.3.0",
|
|
25
|
+
"eslint-plugin-prettier": "3.1.1",
|
|
26
|
+
"karma": "^5.0.9",
|
|
27
|
+
"karma-chai": "^0.1.0",
|
|
28
|
+
"karma-chrome-launcher": "^2.2.0",
|
|
29
|
+
"karma-edge-launcher": "^0.4.2",
|
|
30
|
+
"karma-firefox-launcher": "^1.1.0",
|
|
31
|
+
"karma-ie-launcher": "^1.0.0",
|
|
32
|
+
"karma-junit-reporter": "^1.2.0",
|
|
33
|
+
"karma-mocha": "^1.3.0",
|
|
34
|
+
"karma-safari-launcher": "^1.0.0",
|
|
35
|
+
"mocha": "^2.3.2",
|
|
36
|
+
"prettier": "^2.2.1",
|
|
37
|
+
"rollup": "^1.13.1",
|
|
38
|
+
"rollup-plugin-commonjs": "^10.0.0",
|
|
39
|
+
"rollup-plugin-node-resolve": "^5.0.1",
|
|
40
|
+
"shelljs": "^0.8.4",
|
|
41
|
+
"should": "^7.1.1",
|
|
42
|
+
"watchify": "^3.11.1"
|
|
43
|
+
},
|
|
44
|
+
"license": "Apache-2.0"
|
|
44
45
|
}
|