@mparticle/web-google-analytics-4-client-kit 1.0.0 → 1.0.3
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/GoogleAnalytics4EventForwarderClientSide-Kit.common.js +12 -12
- package/package.json +6 -3
- package/.eslintrc +0 -30
- package/dist/.keep +0 -0
- package/dist/GoogleAnalytics4EventForwarderClientSide-Kit.iife.js +0 -1318
- package/rollup.config.js +0 -52
- package/src/commerce-handler.js +0 -463
- package/src/common.js +0 -104
- package/src/event-handler.js +0 -36
- package/src/identity-handler.js +0 -68
- package/src/initialization.js +0 -75
- package/src/session-handler.js +0 -10
- package/src/user-attribute-handler.js +0 -27
- package/test/boilerplate/karma.config.js +0 -19
- package/test/boilerplate/mockhttprequest.js +0 -472
- package/test/boilerplate/test-index.js +0 -8
- package/test/boilerplate/test-karma.js +0 -8
- package/test/end-to-end-testapp/build/.keep +0 -0
- package/test/end-to-end-testapp/settings.js +0 -10
- package/test/index.html +0 -32
- package/test/settings.json +0 -12
- package/test/tests.js +0 -1433
|
@@ -90,19 +90,19 @@ Common.prototype.getUserId = function (
|
|
|
90
90
|
'. User not set. Please double check your implementation.'
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if (userId) {
|
|
94
|
+
if (hashUserId == 'True') {
|
|
95
|
+
userId = window.mParticle.generateHash(userId);
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
console.warn(
|
|
99
|
+
'External identity type of ' +
|
|
100
|
+
externalUserIdentityType +
|
|
101
|
+
' not set on the user'
|
|
102
|
+
);
|
|
97
103
|
}
|
|
98
|
-
|
|
99
|
-
console.warn(
|
|
100
|
-
'External identity type of ' +
|
|
101
|
-
externalUserIdentityType +
|
|
102
|
-
' not set on the user'
|
|
103
|
-
);
|
|
104
|
+
return userId;
|
|
104
105
|
}
|
|
105
|
-
return userId;
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
var common = Common;
|
|
@@ -673,7 +673,7 @@ IdentityHandler.prototype.onSetUserIdentity = function (
|
|
|
673
673
|
var identityHandler = IdentityHandler;
|
|
674
674
|
|
|
675
675
|
var initialization = {
|
|
676
|
-
name: '
|
|
676
|
+
name: 'GoogleAnalytics4',
|
|
677
677
|
/* ****** Fill out initForwarder to load your SDK ******
|
|
678
678
|
Note that not all arguments may apply to your SDK initialization.
|
|
679
679
|
These are passed from mParticle, but leave them even if they are not being used.
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mparticle/web-google-analytics-4-client-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
|
|
5
5
|
"description": "mParticle integration sdk for Google Analytics",
|
|
6
|
-
"main": "dist/
|
|
7
|
-
"browser": "dist/
|
|
6
|
+
"main": "dist/GoogleAnalytics4EventForwarderClientSide-Kit.common.js",
|
|
7
|
+
"browser": "dist/GoogleAnalytics4EventForwarderClientSide-Kit.common.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/GoogleAnalyticsEvent4ForwarderClientSide-Kit.common.js"
|
|
10
|
+
],
|
|
8
11
|
"scripts": {
|
|
9
12
|
"test": "node test/boilerplate/test-karma.js",
|
|
10
13
|
"build": "ENVIRONMENT=production rollup --config rollup.config.js",
|
package/.eslintrc
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": {
|
|
4
|
-
"browser": true,
|
|
5
|
-
"node": true
|
|
6
|
-
},
|
|
7
|
-
"globals": {
|
|
8
|
-
"mParticle": true,
|
|
9
|
-
"gtag": true,
|
|
10
|
-
"describe": true,
|
|
11
|
-
"Should": true,
|
|
12
|
-
"MockHttpServer": true,
|
|
13
|
-
"it": true,
|
|
14
|
-
"sinon": true,
|
|
15
|
-
"const": true,
|
|
16
|
-
"before": true,
|
|
17
|
-
"beforeEach": true,
|
|
18
|
-
"after": true,
|
|
19
|
-
"Leanplum": true
|
|
20
|
-
},
|
|
21
|
-
"extends": ["plugin:prettier/recommended", "eslint:recommended"],
|
|
22
|
-
"plugins": ["prettier"],
|
|
23
|
-
"rules": {
|
|
24
|
-
"prettier/prettier": "error",
|
|
25
|
-
"no-prototype-builtins": "off",
|
|
26
|
-
"no-empty": "off",
|
|
27
|
-
"no-useless-escape": "off",
|
|
28
|
-
"no-unexpected-multiline": "off"
|
|
29
|
-
}
|
|
30
|
-
}
|
package/dist/.keep
DELETED
|
File without changes
|