witty-laptop-42616
10/15/2021, 6:36 AMeager-camera-84109
10/28/2021, 12:14 PMshy-butcher-30505
11/02/2021, 10:33 AMplain-lizard-13513
11/12/2021, 1:29 PM# segment_user_key => anonymous_id/user_id
# segment_user_id => anonid/current_user.id
#
def analytics_event_tracking
Analytics.track(
event: 'Experiment Viewed',
segment_user_key => segment_user_id,
properties: {
experiment_id: experiment.id,
variation_id: experiment.variation
}
)
end
we were using this code in the backend to fire the experiment viewed event. My comment above shows what those values can be
of course - what happens here though is we are potentially losing the context between logged in and logged out users.
If somebody comes to the site, triggers an Experiment Viewed event while logged out, registers - then their user key/id will change (now its the logged in version) and so the goal when triggered will be presumably not be measured as it can't be matched?
If we instead always use their logged out key - we lose the ability to track them across devices?
That said, while looking at the docs https://docs.growthbook.io/lib/ruby#tracking I see that you recommend not sending user identifiers at all. Is that because if we kick this to Segment they'll just handle all of this? Send the logged in/logged out ID's and the query on your side looks for both?
Be good to understand this a little more to make sure our implementation is bullet prooffresh-football-47124
orange-train-515
11/17/2021, 10:33 AMorange-train-515
11/17/2021, 2:45 PMuser
11/18/2021, 7:57 AMmicroscopic-zebra-5535
11/24/2021, 12:46 PMfull-vase-45670
11/30/2021, 5:49 AMmicroscopic-zebra-5535
11/30/2021, 4:51 PMmicroscopic-zebra-5535
12/02/2021, 9:07 PMorange-train-515
12/03/2021, 12:29 PMfaint-airplane-8152
12/04/2021, 5:38 AMmicroscopic-zebra-5535
12/05/2021, 10:24 PMkind-shampoo-79818
12/09/2021, 2:03 PMstraight-businessperson-54316
12/10/2021, 2:55 PM==
instead of =
. Here, I'm using a Mixpanel event property in my metric.microscopic-zebra-5535
12/15/2021, 3:34 PMstraight-businessperson-54316
12/16/2021, 8:47 AMeager-camera-84109
12/16/2021, 1:18 PMloud-oil-56613
12/17/2021, 9:40 PMorange-train-515
12/20/2021, 10:15 AMorange-train-515
12/20/2021, 11:39 AMJOIN segment s ON (s.user_id = u.user_id)
In my data source configuration, I already have some user properties that are used in the experiment analysis and are pageview-level. Wouldn't it make sense to have user properties as a part of the pageview query?
SELECT
user_id,
timestamp,
url,
has_orders,
lang,
country
FROM pageviews
In which case it would me much easier to calculate the estimates for an experiment based on pageviews by just filtering pageviews with certain user properties.
Looks like I can achieve more precision by editing this query
SELECT
u.user_id,
MIN(u.conversion_end) AS conversion_end,
MIN(u.session_start) AS session_start,
MIN(u.actual_start) AS actual_start
FROM
__users u
JOIN
segment s
ON
(s.user_id = u.user_id)
WHERE
s.date <= u.actual_start
GROUP BY
u.user_id
When I change <= to simple "=" , I only join user properties which were observed exactly on viewing specific page and not before that.orange-train-515
12/21/2021, 3:53 PMancient-truck-93012
12/22/2021, 3:23 PMblue-nightfall-51459
12/23/2021, 2:47 AMancient-truck-93012
01/10/2022, 6:50 PMn
eligible users and a current rev per user of k
we’d expect a lift of n*k*.13
This is something we could do backend pretty easily but i was wondering if theres any features built in to do it or if alternatively someone else has a clean implementation ?miniature-apple-97656
01/11/2022, 2:41 AMorange-train-515
01/12/2022, 2:46 PM__distinctUsers as (
-- One row per user/dimension
SELECT
e.user_id,
'All' as dimension,
(
CASE
WHEN count(distinct e.variation) > 1 THEN '__multiple__'
ELSE max(e.variation) END
) as variation,
MIN(e.actual_start) as actual_start,
MIN(e.session_start) as session_start,
MIN(e.conversion_end) as conversion_end
FROM
__experiment e
JOIN __segment s ON (s.user_id = e.user_id)
GROUP BY
dimension,
e.user_id
),
There's seemingly no reference to the semgent data later on in the querybusy-secretary-78039
01/12/2022, 11:13 PM