-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Analytics] Prepare for Mixpanel Migration of website Insights #8354
Conversation
/werft run 👍 started the job as gitpod-build-mixpanel-migration-prep.1 |
Codecov Report
@@ Coverage Diff @@
## main #8354 +/- ##
=========================================
+ Coverage 8.42% 11.17% +2.75%
=========================================
Files 33 18 -15
Lines 2339 993 -1346
=========================================
- Hits 197 111 -86
+ Misses 2137 880 -1257
+ Partials 5 2 -3
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
/werft run 👍 started the job as gitpod-build-mixpanel-migration-prep.2 |
Starting review now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested and works as advertised
Description
PR prepares to move visitor (i.e. everyone but authenticated user) data out of mixpanel through the following two steps:
SegmentAnalyticsWriter
to feature the integrations object in the payload, which ensures that an event is not forwarded to Mixpanel if the user is not authenticated. This has to be specified in the app as the event filtering in Segment unfortunately does not allow to check for the existence ofuserId
These two changes are prerequisites to converting to a paying subscription with Mixpanel as we would else either risk data loss or a spike in the cost of ownership.
Related Issue(s)
How to test
page()
call whetherintegrations
exists with"Mixpanel": false
(the initial page call should occur before authenticating and thus not be forwarded to Mixpanel as theuserId
is not passed along)signup
track event sent to Segment thatintegrations
exists with"Mixpanel": true
(signups always contain theuserId
, so Segment should forward this to Mixpanel). Then, check that the signup event contains aqualified
property with the valuefalse
(as the cookiegitpod-marketing-website-visited
should not yet exist for this domain)gitpod-marketing-website-visited=true
(current domain, expiry at least session; one way to do this is to go to the console of the developer tool and enterdocument.cookie="gitpod-marketing-website-visited=true"
)signup
event call and make sure that thequalified
property in the Segment Debugger istrue
this timeRelease Notes
Documentation
/werft analytics=segment|TEZnsG4QbLSxLfHfNieLYGF4cDwyFWoe