@mparticle/web-google-analytics-4-client-kit 1.0.0 → 1.0.1
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.
|
@@ -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.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var GoogleAnalytics4Kit = (function (exports) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
function Common() {}
|
|
@@ -89,19 +89,19 @@ var GoogleAnalytics4EventForwarderKit = (function (exports) {
|
|
|
89
89
|
'. User not set. Please double check your implementation.'
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
if (userId) {
|
|
93
|
+
if (hashUserId == 'True') {
|
|
94
|
+
userId = window.mParticle.generateHash(userId);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
console.warn(
|
|
98
|
+
'External identity type of ' +
|
|
99
|
+
externalUserIdentityType +
|
|
100
|
+
' not set on the user'
|
|
101
|
+
);
|
|
96
102
|
}
|
|
97
|
-
|
|
98
|
-
console.warn(
|
|
99
|
-
'External identity type of ' +
|
|
100
|
-
externalUserIdentityType +
|
|
101
|
-
' not set on the user'
|
|
102
|
-
);
|
|
103
|
+
return userId;
|
|
103
104
|
}
|
|
104
|
-
return userId;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
var common = Common;
|
|
@@ -672,7 +672,7 @@ var GoogleAnalytics4EventForwarderKit = (function (exports) {
|
|
|
672
672
|
var identityHandler = IdentityHandler;
|
|
673
673
|
|
|
674
674
|
var initialization = {
|
|
675
|
-
name: '
|
|
675
|
+
name: 'GoogleAnalytics4',
|
|
676
676
|
/* ****** Fill out initForwarder to load your SDK ******
|
|
677
677
|
Note that not all arguments may apply to your SDK initialization.
|
|
678
678
|
These are passed from mParticle, but leave them even if they are not being used.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mparticle/web-google-analytics-4-client-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)",
|
|
5
5
|
"description": "mParticle integration sdk for Google Analytics",
|
|
6
6
|
"main": "dist/GoogleAnalytics4EventForwarder-Kit.common.js",
|
package/rollup.config.js
CHANGED
|
@@ -14,7 +14,7 @@ const productionBuilds = {
|
|
|
14
14
|
output: {
|
|
15
15
|
...production.output,
|
|
16
16
|
format: 'iife',
|
|
17
|
-
file: `dist/${initialization.name}
|
|
17
|
+
file: `dist/${initialization.name}EventForwarderClientSide-Kit.iife.js`,
|
|
18
18
|
name: `${initialization.name}Kit`,
|
|
19
19
|
},
|
|
20
20
|
plugins: [...production.plugins],
|
|
@@ -24,7 +24,7 @@ const productionBuilds = {
|
|
|
24
24
|
output: {
|
|
25
25
|
...production.output,
|
|
26
26
|
format: 'cjs',
|
|
27
|
-
file: `dist/${initialization.name}
|
|
27
|
+
file: `dist/${initialization.name}EventForwarderClientSide-Kit.common.js`,
|
|
28
28
|
name: `${initialization.name}Kit`,
|
|
29
29
|
},
|
|
30
30
|
plugins: [...production.plugins],
|
package/src/common.js
CHANGED
|
@@ -86,19 +86,19 @@ Common.prototype.getUserId = function (
|
|
|
86
86
|
'. User not set. Please double check your implementation.'
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
if (userId) {
|
|
90
|
+
if (hashUserId == 'True') {
|
|
91
|
+
userId = window.mParticle.generateHash(userId);
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
console.warn(
|
|
95
|
+
'External identity type of ' +
|
|
96
|
+
externalUserIdentityType +
|
|
97
|
+
' not set on the user'
|
|
98
|
+
);
|
|
93
99
|
}
|
|
94
|
-
|
|
95
|
-
console.warn(
|
|
96
|
-
'External identity type of ' +
|
|
97
|
-
externalUserIdentityType +
|
|
98
|
-
' not set on the user'
|
|
99
|
-
);
|
|
100
|
+
return userId;
|
|
100
101
|
}
|
|
101
|
-
return userId;
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
module.exports = Common;
|
package/src/initialization.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var initialization = {
|
|
2
|
-
name: '
|
|
2
|
+
name: 'GoogleAnalytics4',
|
|
3
3
|
/* ****** Fill out initForwarder to load your SDK ******
|
|
4
4
|
Note that not all arguments may apply to your SDK initialization.
|
|
5
5
|
These are passed from mParticle, but leave them even if they are not being used.
|