ga4-export-fixer 0.2.2-dev.0 → 0.2.2-dev.2

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.2.2-dev.0",
3
+ "version": "0.2.2-dev.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -239,7 +239,7 @@ ${excludedEventsSQL}`,
239
239
  merged_user_id: `ifnull(${helpers.aggregateValue('user_id', 'last', mainTimestampColumn)}, any_value(user_pseudo_id))`,
240
240
  session_params: helpers.aggregateSessionParams(mergedConfig.sessionParams, 'session_params_prep', mainTimestampColumn),
241
241
  session_traffic_source_last_click: helpers.aggregateValue('session_traffic_source_last_click', 'first', mainTimestampColumn),
242
- session_first_traffic_source: helpers.aggregateValue('collected_traffic_source', 'first', mainTimestampColumn),
242
+ session_first_traffic_source: `array_agg(collected_traffic_source order by ${mainTimestampColumn} limit 1)[safe_offset(0)]`, // don't ignore nulls
243
243
  landing_page: helpers.aggregateValue(`if(entrances > 0, page, null)`, 'first', mainTimestampColumn),
244
244
  },
245
245
  from: 'event_data',
@@ -356,6 +356,7 @@ ${JSON.stringify(
356
356
  'ga4_export_fixer': 'true'
357
357
  }
358
358
  },
359
+ onSchemaChange: 'EXTEND',
359
360
  tags: ['ga4_export_fixer'],
360
361
  // todo: include columns object
361
362
  columns: {