Skip to content

Commit

Permalink
Merge pull request #35 from Springbok-Agency/tessa-beijloos-patch-10
Browse files Browse the repository at this point in the history
Update base_select.sql
  • Loading branch information
tessa-beijloos authored Dec 16, 2024
2 parents 22a3381 + 739b47b commit e8a3564
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/base_select.sql
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
)) from unnest(items) as unnested_items
) items
, property_id
, {{ ga4.unnest_key('event_params', 'ga_session_id', 'int_value', 'session_id') }}
, COALESCE({{ ga4.unnest_key('event_params', 'ga_session_id', 'int_value', 'session_id') }},
CAST(REGEXP_EXTRACT(COALESCE((select value.string_value from unnest(event_params) where key = 'ga_session_id') , ""), r'^GS\d\.\d\.(\d+)') AS INT64)) as session_id
, {{ ga4.unnest_key('event_params', 'page_location') }}
, {{ ga4.unnest_key('event_params', 'ga_session_number', 'int_value', 'session_number') }}
, COALESCE(
Expand Down

0 comments on commit e8a3564

Please sign in to comment.