@uniformdev/context-gtag 19.79.1-alpha.13 → 19.79.1-alpha.25

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/LICENSE.txt CHANGED
@@ -1,2 +1,2 @@
1
- © 2023 Uniform Systems, Inc. All Rights Reserved.
1
+ © 2024 Uniform Systems, Inc. All Rights Reserved.
2
2
  See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
package/dist/index.esm.js CHANGED
@@ -11,7 +11,6 @@ var enableGoogleGtagAnalytics = (options) => {
11
11
  return {
12
12
  init: (context) => {
13
13
  const onPersonalizationResult = (result) => {
14
- var _a;
15
14
  if (!isGtagConfigured()) {
16
15
  context.log("warn", 700);
17
16
  return;
@@ -19,10 +18,13 @@ var enableGoogleGtagAnalytics = (options) => {
19
18
  if (!emitAll && !result.changed) {
20
19
  return;
21
20
  }
22
- (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
23
- event_category: "Uniform Personalization",
24
- event_label: result.variantIds.join(", "),
25
- is_control_group: result.control ? 1 : 0
21
+ result.variantIds.forEach((variant) => {
22
+ var _a;
23
+ (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
24
+ event_category: "Uniform Personalization",
25
+ event_label: variant.id,
26
+ is_control_group: result.control || variant.control ? 1 : 0
27
+ });
26
28
  });
27
29
  };
28
30
  const onTestResult = (result) => {
package/dist/index.js CHANGED
@@ -35,7 +35,6 @@ var enableGoogleGtagAnalytics = (options) => {
35
35
  return {
36
36
  init: (context) => {
37
37
  const onPersonalizationResult = (result) => {
38
- var _a;
39
38
  if (!isGtagConfigured()) {
40
39
  context.log("warn", 700);
41
40
  return;
@@ -43,10 +42,13 @@ var enableGoogleGtagAnalytics = (options) => {
43
42
  if (!emitAll && !result.changed) {
44
43
  return;
45
44
  }
46
- (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
47
- event_category: "Uniform Personalization",
48
- event_label: result.variantIds.join(", "),
49
- is_control_group: result.control ? 1 : 0
45
+ result.variantIds.forEach((variant) => {
46
+ var _a;
47
+ (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
48
+ event_category: "Uniform Personalization",
49
+ event_label: variant.id,
50
+ is_control_group: result.control || variant.control ? 1 : 0
51
+ });
50
52
  });
51
53
  };
52
54
  const onTestResult = (result) => {
package/dist/index.mjs CHANGED
@@ -11,7 +11,6 @@ var enableGoogleGtagAnalytics = (options) => {
11
11
  return {
12
12
  init: (context) => {
13
13
  const onPersonalizationResult = (result) => {
14
- var _a;
15
14
  if (!isGtagConfigured()) {
16
15
  context.log("warn", 700);
17
16
  return;
@@ -19,10 +18,13 @@ var enableGoogleGtagAnalytics = (options) => {
19
18
  if (!emitAll && !result.changed) {
20
19
  return;
21
20
  }
22
- (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
23
- event_category: "Uniform Personalization",
24
- event_label: result.variantIds.join(", "),
25
- is_control_group: result.control ? 1 : 0
21
+ result.variantIds.forEach((variant) => {
22
+ var _a;
23
+ (_a = theWindow.gtag) == null ? void 0 : _a.call(theWindow, "event", result.name, {
24
+ event_category: "Uniform Personalization",
25
+ event_label: variant.id,
26
+ is_control_group: result.control || variant.control ? 1 : 0
27
+ });
26
28
  });
27
29
  };
28
30
  const onTestResult = (result) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context-gtag",
3
- "version": "19.79.1-alpha.13+608a273da",
3
+ "version": "19.79.1-alpha.25+87cea1cd47",
4
4
  "description": "Uniform Context Google global site tag analytics package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "@types/gtag.js": "0.0.18"
31
31
  },
32
32
  "dependencies": {
33
- "@uniformdev/context": "19.79.1-alpha.13+608a273da"
33
+ "@uniformdev/context": "19.79.1-alpha.25+87cea1cd47"
34
34
  },
35
35
  "files": [
36
36
  "/dist"
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "608a273da87aa432f17b2c8ce15d747dadab0cd1"
41
+ "gitHead": "87cea1cd47c691f7d32b876660d5f7c984bb1d87"
42
42
  }