-
Analyzing Brand Occurrences and Event Counts in GA4 with BigQuery
Hey there,
So let me make sure I got this right. You’re checking the number of times different brands got added to the cart in GA4, correct? And you’re using BigQuery to get this information for each day.
You want your result to look something like this right?
– 2022-05-01, add_to_cart, Nike, 42
– 2022-05-01, add_to_cart, Adidas, 32
– 2022-05-02, add_to_cart, Nike, 47
– 2022-05-03, add_to_cart, Nike, 23You’re experimenting with a query, which seems like it hits a snag, and gives you an error – ‘Scalar subquery produced more than one element’.
Your query is:
`
SELECT
event_date,
event_name,
(SELECT item_brand FROM unnest(items)) AS brand
FROMbigquery-xxxxxx.analytics_xxxxxxxxx.events_2022-5*
WHERE event_name = ‘add_to_cart’
`
Can anyone explain to me what I am doing wrong?
Log in to reply.