I have a question about funnel metrics. Just want ...
# ask-questions
j
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
@blue-sundown-32899 has marked the issue as closed. Reopen Issue button
b
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
Thanks @brief-honey-45610
r
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
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
Hey Erik, let me confirm both of these points with our data scientist and I'll follow up once I have more info!
j
Thanks again!
r
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
No worries! That clears some stuff up and I'll go from there. Thanks!
r
Hi Erik, you're welcome. 🙂