bumpy-finland-5739
11/20/2023, 2:10 PMexperiment_viewed
event setup and pushing through the DL into GA4 and into BigQuery. We also have the gb_user_id
in the event pushing successfully for each unique session.
--
My question is, when we have an experiment setup and the experiment_viewed
successfully firing with the correct experiment_id, variation_id and gb_user_id, do all the metrics for that experiment that are triggered based on GA4 events - e.g. add to cart, purchase need to have matching gb_user_id
within the metric setup in GB? For example this is our current add_to_cart metric.
SELECT
(select value.string_value from unnest(user_properties) where key = 'gb_user_id') as consumer,
(select value.string_value from unnest(event_params) where key = 'page_location') as page_location,
event_name,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
1 as value
FROM
`growthbook-377317`.`analytics_320607085`.`events_*`
WHERE
event_name = 'add_to_cart'
AND (select value.string_value from unnest(user_properties) where key = 'gb_user_id') is not null
AND ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') OR
(_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
rhythmic-agent-34208
11/20/2023, 2:10 PMbrief-honey-45610
11/20/2023, 2:29 PMbumpy-finland-5739
11/21/2023, 12:04 AMgb_user_id
into user_properties
- we are seeing sporadically that on multiple events we are missing gb_user_id from say add_to_cart, view_item, purchase etc… I don’t know GA4 and Bigquery connection well enough but could it be pushing into the user_properties that is causing the issues? Would we be safer pushing into event_params?rhythmic-agent-34208
11/21/2023, 3:41 AMfresh-football-47124