ga4-export-fixer 0.9.0-dev.4 → 0.9.0-dev.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ga4-export-fixer",
3
- "version": "0.9.0-dev.4",
3
+ "version": "0.9.0-dev.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -205,31 +205,21 @@ const _generateEnhancedEventsSQL = (mergedConfig) => {
205
205
  // exclude default export columns that are not needed
206
206
  // do this first so that the columns defined later are not excluded
207
207
  ...getExcludedColumns(),
208
- // date and time
209
208
  event_date: helpers.eventDate,
210
209
  event_datetime: `extract(datetime from timestamp_micros(${helpers.getEventTimestampMicros(mergedConfig.customTimestampParam)}) at time zone '${mergedConfig.timezone}')`,
211
- event_timestamp: 'event_timestamp',
212
210
  event_custom_timestamp: mergedConfig.customTimestampParam ? helpers.getEventTimestampMicros(mergedConfig.customTimestampParam) : undefined,
213
- // event name
214
- event_name: 'event_name',
215
- // identifiers
216
211
  session_id: helpers.sessionId,
217
- user_pseudo_id: 'user_pseudo_id',
218
- user_id: 'user_id',
219
- // page
212
+ // page details
220
213
  page_location: helpers.unnestEventParam('page_location', 'string'),
221
214
  page: helpers.extractPageDetails(),
222
- // event parameters and user properties
215
+ // promote event params to columns
223
216
  ...promotedEventParameters(),
224
217
  event_params: helpers.filterEventParams(mergedConfig.excludedEventParams, 'exclude'),
225
- user_properties: 'user_properties',
226
- // traffic source
227
- collected_traffic_source: 'collected_traffic_source',
228
- session_traffic_source_last_click: 'session_traffic_source_last_click',
218
+ // rename traffic_source for clarity
229
219
  user_traffic_source: 'traffic_source',
230
220
  // ecommerce
231
221
  ecommerce: helpers.fixEcommerceStruct('ecommerce'),
232
- items: 'items',
222
+ // assign a unique row id, used for handling item-level attribution and enrichment
233
223
  _item_row_id: itemListAttribution ? helpers.itemRowId(ecommerceEventsFilter) : undefined,
234
224
  // flag if the data is "final" and is not expected to change anymore
235
225
  data_is_final: helpers.isFinalData(mergedConfig.dataIsFinal.detectionMethod, mergedConfig.dataIsFinal.dayThreshold),