busy-air-96466
06/19/2024, 4:09 PMWITH
__rawExperiment AS (
SELECT
user_id as user_id,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
experiment_id_param.value.string_value AS experiment_id,
<http://variation_id_param.value.int|variation_id_param.value.int>_value AS variation_id,
user_properties_param.value.string_value AS gender,
geo.country as country,
traffic_source.source as source,
traffic_source.medium as medium,
device.category as device,
device.web_info.browser as browser,
device.operating_system as os
FROM
(
SELECT
*
FROM
``analytics_209649058`.`events_*``
WHERE
_TABLE_SUFFIX BETWEEN '20240619' AND '20240619'
UNION ALL
SELECT
*
FROM
``analytics_209649058.events_intraday_*``
WHERE
_TABLE_SUFFIX BETWEEN '20240619' AND '20240619'
),
UNNEST (event_params) AS experiment_id_param,
UNNEST (event_params) AS variation_id_param,
UNNEST (user_properties) AS user_properties_param
WHERE
event_name = 'experiment_viewed'
AND experiment_id_param.key = 'experiment_id'
AND variation_id_param.key = 'variation_id'
AND user_properties_param.key = 'user_gender'
AND user_id is not null
),
If I remove the line AND user_properties_param.key = 'user_gender'
and run the query in BigQuery, then I see the expected results. But I can't work out how to remove the user_gender reference in the experiment query?
Grateful for any help! I've looked through all the settings and can't see where user_gender is being specified. I checked custom filters, see screenshot, but it doesn't look as though gender is selected as a filter.fresh-football-47124
fresh-football-47124
fresh-football-47124
fresh-football-47124
busy-air-96466
06/20/2024, 8:00 AMbusy-air-96466
06/20/2024, 8:03 AMparse_date('%Y%m%d',event_date) as date,
user_id,
user_properties.value.string_value as value
FROM (
`SELECT * FROM analytics_209649058
.`events_*``
WHERE _TABLE_SUFFIX BETWEEN '{{startYear}}{{startMonth}}{{startDay}}' AND '{{endYear}}{{endMonth}}{{endDay}}'
UNION ALL
`SELECT * FROM `analytics_209649058.events_intraday_*``
),
unnest(user_properties) as user_properties
where
user_properties.key = 'company_name'
and user_properties.value.string_value is not null
busy-air-96466
06/20/2024, 8:03 AMbusy-air-96466
06/20/2024, 3:51 PMfresh-football-47124
busy-air-96466
06/20/2024, 3:52 PMbusy-air-96466
06/20/2024, 3:54 PMbusy-air-96466
06/20/2024, 3:54 PMbusy-air-96466
06/20/2024, 3:56 PM