adorable-fall-26390
12/06/2024, 12:56 PMadorable-fall-26390
12/06/2024, 1:01 PMgbuuid
as a event parameter in the experiment_viewed
GA4 event and use the following BigQuery query to analyze the number of users that are exposed to mutiple variations.
WITH events AS (
SELECT
user_pseudo_id,
(select value.string_value from unnest(event_params) where key = 'gbuuid') as gbuuid,
(select value.string_value from unnest(event_params) where key = 'experiment_id') as experiment_id,
(select value.string_value from unnest(event_params) where key = 'variation_id') as variation_id,
FROM `analytics_12345.events_202411*`
WHERE event_name = "experiment_viewed"
AND privacy_info.analytics_storage = "Yes"
),
variation_count AS (
SELECT
user_pseudo_id,
gbuuid,
experiment_id,
COUNT(DISTINCT variation_id) variations
FROM events
GROUP BY 1,2,3
)
SELECT
experiment_id,
variations,
COUNT(DISTINCT user_pseudo_id) ga4_users,
COUNT(DISTINCT gbuuid) gb_users
FROM variation_count
GROUP BY 1,2
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
adorable-fall-26390
12/08/2024, 7:46 PMhundreds-easter-23383
12/08/2024, 8:00 PMgbuuid
and then we track the value of the gbuuid
cookie as an event parameter in the experiement_viewed
GA4 event, to see how well it matches the GA4 cookie id.
Consent should not be an issue. On this client, the Growthbook SDK is loaded from GTM when analytics consent is given and we only query consented data from GA4 in BigQuery.
This is the result of the above query, which shows the number of users (based on the GA4 and the gbuuid
ID) exposed to 2 variants. The share of users is almost identical regardless of which user ID we look at.wonderful-optician-39484
12/09/2024, 7:58 AMhundreds-easter-23383
12/10/2024, 3:02 PMuser_pseudo_id
but gbuuid
changes when the user return on the next day.
The users gets a new variation on the find-store-add-information-click-collect
experiment.
The result is that the GA4 user has 2 variations while the GB user only has 1 variationer per user. In reality it is the same user, which means the same user has seen 2 variations even though that is not clear when only looking at the gbuuid
cookie.
So either the gbuuid
cookie has been deleted or GB has generated a new ID for this user.
Please let me know what you think?hundreds-easter-23383
12/11/2024, 7:51 AMgbuuid
This suggests that it is not an isolated case, but something that happens for 1,6% of users.adorable-fall-26390
12/11/2024, 7:52 AMfresh-football-47124
fresh-football-47124
hundreds-easter-23383
12/11/2024, 7:54 AMuser_pseudo_id
hundreds-easter-23383
12/11/2024, 7:54 AMWITH events AS (
SELECT
user_pseudo_id,
(select value.string_value from unnest(event_params) where key = 'gbuuid') as gbuuid,
(select value.string_value from unnest(event_params) where key = 'experiment_id') as experiment_id,
(select value.string_value from unnest(event_params) where key = 'variation_id') as variation_id,
FROM `analytics_253505787.events_*`
WHERE event_name = "experiment_viewed"
AND privacy_info.analytics_storage = "Yes"
AND _table_suffix >= '20241206'
),
gbuuid_count AS (
SELECT
user_pseudo_id,
COUNT(DISTINCT gbuuid) gbuuids,
FROM events
GROUP BY 1
)
SELECT
gbuuids AS gbuuid_count,
COUNT(DISTINCT user_pseudo_id) ga4_users
FROM gbuuid_count
GROUP BY 1
ORDER BY 1 ASC
adorable-fall-26390
12/11/2024, 7:54 AMfresh-football-47124
hundreds-easter-23383
12/11/2024, 7:57 AMfresh-football-47124
hundreds-easter-23383
12/11/2024, 7:59 AMhundreds-easter-23383
12/11/2024, 8:00 AM