https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
j

jolly-raincoat-49731

11/06/2023, 7:56 PM
I have a question about funnel metrics. Just want to make sure I'm doing this correct. My query:
Copy code
SELECT
  user_id,
  user_pseudo_id as anonymous_id,
  TIMESTAMP_MICROS(event_timestamp) as timestamp
FROM
  `database`.`analytics_12345`.`events_*`
WHERE
  event_name = 'purchase'
  AND ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') OR
       (_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
Then I have
view_cart
as my denominator. This is trying to setup the one in the docs,
% checkout / % viewed cart
. We use GA4/BigQuery as our data source. Is this correct?
1
r

rhythmic-agent-34208

11/06/2023, 7:56 PM
@blue-sundown-32899 has marked the issue as closed. Reopen Issue button
b

brief-honey-45610

11/06/2023, 9:46 PM
Hi Erik, thanks for reaching out! I'll look into this for you and reply here with an update as soon as I can 🙂
j

jolly-raincoat-49731

11/06/2023, 9:46 PM
Thanks @brief-honey-45610
r

rhythmic-agent-34208

11/06/2023, 11:29 PM
Hi Erik, this looks correct to me based on what I see in the docs: https://docs.growthbook.io/app/metrics#funnel-metrics One thing to note, which you probably already know but I want to be thorough, is that the syntax you see like ​`{{date startDateISO "yyyyMMdd"}}`​ in the query you shared is just a placeholder, and you'll need to replace that with your own datetime values. 🙂
j

jolly-raincoat-49731

11/07/2023, 2:06 PM
Ahh, I guess I didn't realize that. Are the dates necessary?
For the funnel metrics does it look at timestamps for the events to confirm that one happened before the other? Example it's either: 1) event A and event B both happened or 2) event A timestamp is greater than event B and we can than sus out that one happened before the other
b

brief-honey-45610

11/07/2023, 5:16 PM
Hey Erik, let me confirm both of these points with our data scientist and I'll follow up once I have more info!
j

jolly-raincoat-49731

11/07/2023, 5:17 PM
Thanks again!
r

rhythmic-agent-34208

11/07/2023, 9:08 PM
Hey Erik, I'm afraid I gave you incorrect information earlier and I apologize! I'm fairly new to the GrowthBook team and still learning about our tooling. The syntax you see like ​​`{{date startDateISO "yyyyMMdd"}}`​​ in the query is SQL templating and ​*should remain as-is*​. You do not need to change this; we detect the dates based on your data and configurations.
I apologize if that suggestion sent you down a rabbit hole and wasted your time. I obviously won't make that mistake again!
As for your second question, yes, we can determine that one event happened before the other. A slight wrinkle here is that the conversion window sets the expiration date, but you can configure that if needed. (I did run all this by our Data Scientist just to be sure.)
j

jolly-raincoat-49731

11/08/2023, 2:00 PM
No worries! That clears some stuff up and I'll go from there. Thanks!
r

rhythmic-agent-34208

11/08/2023, 7:38 PM
Hi Erik, you're welcome. 🙂
13 Views