ga4-export-fixer 0.2.3-dev.2 → 0.2.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/README.md CHANGED
@@ -48,7 +48,7 @@ Include the package in the package.json file in your Dataform repository.
48
48
  {
49
49
  "dependencies": {
50
50
  "@dataform/core": "3.0.42",
51
- "ga4-export-fixer": "0.2.2"
51
+ "ga4-export-fixer": "0.2.3"
52
52
  }
53
53
  }
54
54
  ```
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "event_date": "Date of the event, cast to DATE from the original YYYYMMDD string",
3
3
  "event_datetime": "Event datetime converted to the configured timezone from event_timestamp (or custom timestamp if configured)",
4
- "event_timestamp": "Time in microseconds (UTC) when the event was logged by Google Analytics",
4
+ "event_timestamp": "Time in microseconds (UTC) when the event was received by Google Analytics",
5
5
  "event_custom_timestamp": "Event timestamp in microseconds derived from a custom event parameter (e.g. collected via Date.now()), falling back to event_timestamp when the custom parameter is null. Only present when customTimestampParam is configured",
6
6
  "event_name": "Name of the event (e.g. page_view, purchase, scroll)",
7
7
  "session_id": "Unique session identifier, constructed by concatenating user_pseudo_id with the ga_session_id event parameter",
@@ -48,7 +48,7 @@
48
48
  "columns": {
49
49
  "string_value": "String value of the event parameter",
50
50
  "int_value": "Integer value of the event parameter",
51
- "float_value": "Float value of the event parameter",
51
+ "float_value": "Float value of the event parameter (currently unused in GA4)",
52
52
  "double_value": "Double value of the event parameter"
53
53
  }
54
54
  }
@@ -63,14 +63,14 @@
63
63
  "columns": {
64
64
  "string_value": "String value of the session parameter",
65
65
  "int_value": "Integer value of the session parameter",
66
- "float_value": "Float value of the session parameter",
66
+ "float_value": "Float value of the session parameter (currently unused in GA4)",
67
67
  "double_value": "Double value of the session parameter"
68
68
  }
69
69
  }
70
70
  }
71
71
  },
72
72
  "user_properties": {
73
- "description": "User properties set via the Google Analytics SDK or gtag API",
73
+ "description": "User properties",
74
74
  "columns": {
75
75
  "key": "Name of the user property",
76
76
  "value": {
@@ -79,7 +79,7 @@
79
79
  "string_value": "String value of the user property",
80
80
  "int_value": "Integer value of the user property",
81
81
  "double_value": "Double value of the user property",
82
- "float_value": "Float value of the user property (currently unused by GA4)",
82
+ "float_value": "Float value of the user property (currently unused in GA4)",
83
83
  "set_timestamp_micros": "Time in microseconds at which the user property was last set"
84
84
  }
85
85
  }
@@ -284,7 +284,7 @@
284
284
  "source": "Source network that first acquired the user"
285
285
  }
286
286
  },
287
- "event_previous_timestamp": "Time in microseconds (UTC) when the previous event was logged",
287
+ "event_previous_timestamp": "Time in microseconds (UTC) when the previous event happened",
288
288
  "event_value_in_usd": "Currency-converted value (in USD) of the event's 'value' parameter",
289
289
  "event_bundle_sequence_id": "Sequential ID of the bundle in which the event was uploaded",
290
290
  "event_server_timestamp_offset": "Timestamp offset between collection time and upload time in microseconds",
package/documentation.js CHANGED
@@ -10,6 +10,8 @@ const columnDescriptions = require('./columns/columnDescriptions.json');
10
10
  const getColumnDescriptions = (config) => {
11
11
  const descriptions = JSON.parse(JSON.stringify(columnDescriptions));
12
12
 
13
+ if (!config) return descriptions;
14
+
13
15
  const appendToDescription = (key, suffix) => {
14
16
  if (!descriptions[key]) return;
15
17
  if (typeof descriptions[key] === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ga4-export-fixer",
3
- "version": "0.2.3-dev.2",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
package/utils.js CHANGED
@@ -205,6 +205,14 @@ const mergeSQLConfigurations = (defaultConfig, inputConfig = {}) => {
205
205
  result.sourceTable = fixSourceTable(result.sourceTable);
206
206
  }
207
207
 
208
+ // include the event parameters listed in the eventParamsToColumns array in excludedEventParams
209
+ if (result.eventParamsToColumns && result.eventParamsToColumns.length > 0) {
210
+ const promotedParameters = result.eventParamsToColumns
211
+ .map(p => p.name)
212
+ .filter(p => typeof p === 'string' && p.trim() !== '');
213
+ result.excludedEventParams = mergeUniqueArrays(result.excludedEventParams, promotedParameters);
214
+ }
215
+
208
216
  return result;
209
217
  };
210
218