Signup events for analytics
Summary
Push signup
events to analyze user conversions
- Closes #1240
Steps to test
- Port forward sandbox sites elasticsearch cluster to your local machine (optional)
- Open your elasticsearch browser and open
minds-metrics-*
index - Sort by
@timestamp
descending - Open the review site, and create a new user. Don't do anything else after that to avoid unnnecesary events.
- Refresh your
minds-metrics-*
view on ElasticSearch browser - Ensure there's a
signup
metric with auser_guid
and acookie_id
value set (might be the third or fourth row from the top). Filtering by cookie_id (which has the same value a mwa cookie on the website).
Note: This one might be tricky for @xander-miller to test as it's a backend-only storage change. The main concern is to ensure new user registration works OK.
Estimated Regression Scope
New block of code executed at register/complete
event, might affect user sign-up.
added scoped labels
changed the description
assigned to @benhayward.ben
- Developer
@Xander if you need help getting set-up to test this one also, DM me.
approved this merge request
changed target branch from
master
toproduction
added 21 commits
-
dcaa9f5d...fec60070 - 4 commits from branch
production
- de6fd8ed - (wip): Frontend rendering module
- 7e2c2364 - Merge branch 'master' of https://gitlab.com/Minds/engine into epic/SSR
- dcaea0d4 - (chore): ci fixes
- f2751134 - Merge branch 'master' of https://gitlab.com/Minds/engine into epic/SSR
- 9a498785 - (chore): ci for preprod
- 5562dca5 - (chore): export pro on api config
- 1d9730a6 - Merge branch 'master' of https://gitlab.com/Minds/engine into epic/SSR
- 1ccf1085 - (chore): allow master to push to preprod too
- d3b9a8ec - Merge branch 'epic/SSR'
- e4fdcb9e - (chore): january token gift
- 550c417c - Merge branch 'production' of https://gitlab.com/Minds/engine
- 85275399 - (chore): bring sandbox helm chart branch to master
- 2d4ca7d6 - (feat): backend for captcha - front#646 (closed)
- 7c362781 - Merge branch 'feat/646-captcha' into 'master'
- 5c3e5b05 - Add environment support to Feature services
- 5e9b7bb9 - Merge branch 'goal/unleash-sync-namespaces' into 'master'
- f880bb3a - Merge remote-tracking branch 'origin/master' into goal/signup-cookie-id
Toggle commit list-
dcaa9f5d...fec60070 - 4 commits from branch
changed target branch from
production
tomaster
- Developer
@benhayward.ben I just re-started review site for this MR.
approved this merge request
- Developer
@benhayward.ben You couldn't create a new account because I needed to create a matching
front
branch that had the captcha fixed. - DeveloperResolved by Emiliano Balbuena
Give me a ping when this is ready Emi - I think you said you needed to add email confirmation?
- Last reply by Emiliano Balbuena
resolved all threads
approved this merge request
added scoped label and automatically removed label
assigned to @xander-miller and unassigned @benhayward.ben
- Developer
66 66 error_log((string) $e); 67 67 } 68 68 69 try { 70 if (isset($_COOKIE['mwa'])) { 71 $event = new Core\Analytics\Metrics\Event(); 72 $event 73 ->setType('action') 74 ->setProduct('platform') 75 ->setAction('signup') 76 ->setUserGuid($params['user']->guid) 77 ->setUserAgent($_SERVER['HTTP_USER_AGENT']) 78 ->setCookieId($_COOKIE['mwa']) 79 ->setLoggedIn(true); - Owner
Need to make sure these match background process (which will stop after this is merged).
$platform = 'browser'; if ($user->signupParentId === 'mobile-native') { $platform = 'mobile'; } $event = new Metrics\Event; $event->setType('action') ->setTimestamp($row['value'] * 1000) ->setProduct('platform') ->setPlatform($platform) ->setUserGuid((string) $row['column1']) ->setAction("signup"); if ($user->referrer) { $event->setReferrerGuid($user->referrer); }
So we need to add in
platform
andreferrerGuid
(if set).
added scoped label and automatically removed label
unapproved this merge request