Hey guys, i have a quick question on a metric setu...
# ask-questions
t
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
Yes, I believe so - @helpful-application-7107 thoughts?
h
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
Like I actually want the count of transactions / total number of sessions @helpful-application-7107.
h
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
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
Yep, that looks right to me!
t
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
Can you share a screen shot of your
session_start
metric? It needs to be a
count
metric in the same data source.
t
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
In your case both need to be count
t
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
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
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
What I described will yield that number for you, it just won't be shown as a percentage in the app.
t
okaay got you