@segment/action-destinations 3.94.1-alpha.8 → 3.94.1-alpha.9
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.
|
@@ -13,9 +13,15 @@ function verifyParams(params) {
|
|
|
13
13
|
if (!params) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
Object.
|
|
17
|
-
if (
|
|
18
|
-
throw new actions_core_1.IntegrationError(
|
|
16
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
17
|
+
if (value instanceof Array) {
|
|
18
|
+
throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [Array]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
|
|
19
|
+
}
|
|
20
|
+
else if (value == null) {
|
|
21
|
+
throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [NULL]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
|
|
22
|
+
}
|
|
23
|
+
else if (typeof value == 'object') {
|
|
24
|
+
throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [${typeof value}]. GA4 does not accept null, array, or object values for event parameters and item parameters.`, 'Invalid value', 400);
|
|
19
25
|
}
|
|
20
26
|
});
|
|
21
27
|
}
|
|
@@ -24,9 +30,12 @@ function verifyUserProps(userProperties) {
|
|
|
24
30
|
if (!userProperties) {
|
|
25
31
|
return;
|
|
26
32
|
}
|
|
27
|
-
Object.
|
|
28
|
-
if (
|
|
29
|
-
throw new actions_core_1.IntegrationError(
|
|
33
|
+
Object.entries(userProperties).forEach(([key, value]) => {
|
|
34
|
+
if (value instanceof Array) {
|
|
35
|
+
throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [Array]. GA4 does not accept array or object values for user properties.`, 'Invalid value', 400);
|
|
36
|
+
}
|
|
37
|
+
else if (value != null && typeof value == 'object') {
|
|
38
|
+
throw new actions_core_1.IntegrationError(`Param [${key}] has unsupported value of type [${typeof value}]. GA4 does not accept array or object values for user properties.`, 'Invalid value', 400);
|
|
30
39
|
}
|
|
31
40
|
});
|
|
32
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,2CAAgD;AAGhD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;QACxD,MAAM,IAAI,+BAAgB,CAAC,GAAG,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;KACvG;AACH,CAAC;AAJD,wCAIC;AAGD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM,EAAE;QACX,OAAM;KACP;IAED,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ga4-functions.js","sourceRoot":"","sources":["../../../src/destinations/google-analytics-4/ga4-functions.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,2CAAgD;AAGhD,SAAgB,cAAc,CAAC,QAAgB;IAC7C,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE;QACxD,MAAM,IAAI,+BAAgB,CAAC,GAAG,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;KACvG;AACH,CAAC;AAJD,wCAIC;AAGD,SAAgB,YAAY,CAAC,MAA0B;IACrD,IAAI,CAAC,MAAM,EAAE;QACX,OAAM;KACP;IAED,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,IAAI,+BAAgB,CACxB,UAAU,GAAG,sIAAsI,EACnJ,eAAe,EACf,G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1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.94.1-alpha.
|
|
4
|
+
"version": "3.94.1-alpha.9",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"lcov"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0906f563b3eb40c71a19ad6b084ea13b1fa1e5c3"
|
|
69
69
|
}
|