Skip to content

Commit

Permalink
feature: add property_id
Browse files Browse the repository at this point in the history
  • Loading branch information
FloDevelops committed May 1, 2024
1 parent f58011f commit 8d279f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions macros/base_select.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
, ecommerce.unique_items
, ecommerce.transaction_id
, items
, {%- if var('combined_dataset', false) != false %} cast(left(regexp_replace(_table_suffix, r'^\d{8}', ''), 100) as int64)
{%- else %} {{ var('property_ids')[0] }}
{%- endif %} as property_id
{% endmacro %}

{% macro base_select_renamed() %}
Expand Down Expand Up @@ -136,6 +139,7 @@
, unnested_items.item_params
)) from unnest(items) as unnested_items
) items
, property_id
, {{ ga4.unnest_key('event_params', 'ga_session_id', 'int_value', 'session_id') }}
, {{ ga4.unnest_key('event_params', 'page_location') }}
, {{ ga4.unnest_key('event_params', 'ga_session_number', 'int_value', 'session_number') }}
Expand Down

0 comments on commit 8d279f0

Please sign in to comment.