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

thankful-oil-10632

09/25/2023, 8:47 PM
Hey guys, i have a quick question on a metric setup. I just want to create a purchase session conversion rate as the metric. So for that, i need to select the binomial as an option and select the session count as the denominator right? please let me know.
f

fresh-football-47124

09/25/2023, 8:51 PM
Yes, I believe so - @helpful-application-7107 thoughts?
h

helpful-application-7107

09/25/2023, 11:45 PM
Binomial as your numerator will make it so that your numerator for each user is either 1 or 0. Do you want to metric to be:
Number of Users who ever made a Purchase / Number of Sessions across all Users
? If so, then yes, your setup is correct.
t

thankful-oil-10632

09/26/2023, 3:05 AM
Like I actually want the count of transactions / total number of sessions @helpful-application-7107.
h

helpful-application-7107

09/26/2023, 2:59 PM
Ok, then you need the numerator to be a count metric and you need the SQL to just return
1 as value
for each transaction.
t

thankful-oil-10632

09/26/2023, 3:08 PM
SELECT user_pseudo_id as anonymous_id, TIMESTAMP_MICROS(event_timestamp) as timestamp, 1 as value FROM
my_table*
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"}}'))
This is fine ? @helpful-application-7107 please advice.
h

helpful-application-7107

09/26/2023, 3:09 PM
Yep, that looks right to me!
t

thankful-oil-10632

09/26/2023, 3:10 PM
But the i cant add the count metric to the numerator.
For eg - i have the metric count of session_start which i cannot find from the field
h

helpful-application-7107

09/26/2023, 3:26 PM
Can you share a screen shot of your
session_start
metric? It needs to be a
count
metric in the same data source.
t

thankful-oil-10632

09/26/2023, 3:27 PM
actually, the current "Session_metric" which shows in the field is the binomial one. I could not add the count metrics in the numerator.
h

helpful-application-7107

09/26/2023, 3:28 PM
In your case both need to be count
t

thankful-oil-10632

09/26/2023, 3:29 PM
yeah so for setting up I should select the count metric - so it should be purchase / count of session right ??
20/2000 = 0.01 will be the value
how can i change them to percentage ?? (1%)
h

helpful-application-7107

09/26/2023, 4:10 PM
so it should be purchase / count of session right ??
Yes
how can i change them to percentage ?? (1%)
This metric doesn't make sense as a percentage, because there's nothing guaranteeing that purchases < count of session.
t

thankful-oil-10632

09/26/2023, 4:12 PM
So basically I want to mimic the session conversion rate in the Ga4 that is number of transactions / total number of sessions. So I want to execute them. Kindly advice me how to do that @helpful-application-7107??
Hey @helpful-application-7107 any suggestion for the above please?
h

helpful-application-7107

09/27/2023, 6:32 PM
What I described will yield that number for you, it just won't be shown as a percentage in the app.
t

thankful-oil-10632

09/27/2023, 6:55 PM
okaay got you
3 Views