@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.
@@ -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
- ;r.type="text/javascript"
77
- ;r.integrity="sha384-girahbTbYZ9tT03PWWj0mEVgyxtZoyDF9KVZdL+R53PP5wCY0PiVUKq0jeRlMx9M"
78
- ;r.crossOrigin="anonymous";r.async=true
79
- ;r.src="https://cdn.amplitude.com/libs/amplitude-7.2.1-min.gz.js"
80
- ;r.onload=function(){if(!e.amplitude.runQueuedFunctions){
81
- console.log("[Amplitude] Error: could not load SDK");}}
82
- ;var i=t.getElementsByTagName("script")[0];i.parentNode.insertBefore(r,i)
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
- ;var a=["add","append","clearAll","prepend","set","setOnce","unset"]
87
- ;for(var c=0;c<a.length;c++){s(o,a[c]);}n.Identify=o;var u=function(){this._q=[]
88
- ;return this}
89
- ;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
90
- ;for(var p=0;p<l.length;p++){s(u,l[p]);}n.Revenue=u
91
- ;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
92
- ;function v(e){function t(t){e[t]=function(){
93
- e._q.push([t].concat(Array.prototype.slice.call(arguments,0)));};}
94
- for(var n=0;n<d.length;n++){t(d[n]);}}v(n);n.getInstance=function(e){
95
- e=(!e||e.length===0?"$default_instance":e).toLowerCase()
96
- ;if(!n._iq.hasOwnProperty(e)){n._iq[e]={_q:[]};v(n._iq[e]);}return n._iq[e]}
97
- ;e.amplitude=n;})(window,document);
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
- "name": "@mparticle/web-amplitude-kit",
3
- "version": "2.2.1",
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
- "dev": "npm run build && npm run test",
14
- "test": "node test/boilerplate/test-karma.js",
15
- "watch": "rollup --config rollup.config.js -w"
16
- },
17
- "devDependencies": {
18
- "chai": "^4.2.0",
19
- "eslint-config-prettier": "6.3.0",
20
- "eslint-plugin-prettier": "3.1.1",
21
- "karma": "^5.0.9",
22
- "karma-chai": "^0.1.0",
23
- "karma-chrome-launcher": "^2.2.0",
24
- "karma-edge-launcher": "^0.4.2",
25
- "karma-firefox-launcher": "^1.1.0",
26
- "karma-ie-launcher": "^1.0.0",
27
- "karma-junit-reporter": "^1.2.0",
28
- "karma-mocha": "^1.3.0",
29
- "karma-safari-launcher": "^1.0.0",
30
- "mocha": "^2.3.2",
31
- "prettier": "^2.2.1",
32
- "rollup": "^1.13.1",
33
- "rollup-plugin-commonjs": "^10.0.0",
34
- "rollup-plugin-node-resolve": "^5.0.1",
35
- "shelljs": "^0.8.4",
36
- "should": "^7.1.1",
37
- "watchify": "^3.11.1"
38
- },
39
- "dependencies": {
40
- "@mparticle/web-sdk": "^2.12.8",
41
- "isobject": "^4.0.0"
42
- },
43
- "license": "Apache-2.0"
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
  }