@jetbrains/ring-ui 4.1.26 → 4.1.27
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @constructor
|
|
5
5
|
*/
|
|
6
6
|
export default class AnalyticsGAPlugin {
|
|
7
|
-
constructor(gaId, isDevelopment, domain) {
|
|
7
|
+
constructor(gaId, isDevelopment, domain, cookielessUserIdentifier) {
|
|
8
8
|
if (!gaId && !isDevelopment) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -25,8 +25,16 @@ export default class AnalyticsGAPlugin {
|
|
|
25
25
|
*/
|
|
26
26
|
const key = gaId || 'UA-57284711-1';
|
|
27
27
|
/* global ga */
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
if (cookielessUserIdentifier) {
|
|
29
|
+
ga('create', key, {
|
|
30
|
+
storage: 'none',
|
|
31
|
+
clientId: cookielessUserIdentifier
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
const gaCookieParams = domain ? {cookieDomain: domain} : {};
|
|
35
|
+
ga('create', key, (!gaId ? {cookieDomain: 'none'} : gaCookieParams));
|
|
36
|
+
}
|
|
37
|
+
|
|
30
38
|
ga('set', 'anonymizeIp', true);
|
|
31
39
|
ga('set', 'allowAdFeatures', false);
|
|
32
40
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @constructor
|
|
5
5
|
*/
|
|
6
6
|
class AnalyticsGAPlugin {
|
|
7
|
-
constructor(gaId, isDevelopment, domain) {
|
|
7
|
+
constructor(gaId, isDevelopment, domain, cookielessUserIdentifier) {
|
|
8
8
|
if (!gaId && !isDevelopment) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
@@ -31,12 +31,20 @@ class AnalyticsGAPlugin {
|
|
|
31
31
|
const key = gaId || 'UA-57284711-1';
|
|
32
32
|
/* global ga */
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
34
|
+
if (cookielessUserIdentifier) {
|
|
35
|
+
ga('create', key, {
|
|
36
|
+
storage: 'none',
|
|
37
|
+
clientId: cookielessUserIdentifier
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
const gaCookieParams = domain ? {
|
|
41
|
+
cookieDomain: domain
|
|
42
|
+
} : {};
|
|
43
|
+
ga('create', key, !gaId ? {
|
|
44
|
+
cookieDomain: 'none'
|
|
45
|
+
} : gaCookieParams);
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
ga('set', 'anonymizeIp', true);
|
|
41
49
|
ga('set', 'allowAdFeatures', false);
|
|
42
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.27",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "91ee90ef36ff1b781a040d70e62da7eed0e9f960"
|
|
225
225
|
}
|