-
Notifications
You must be signed in to change notification settings - Fork 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
Signup: Alias anonUserId to WPCOM user id when user is created #11715
Conversation
client/lib/analytics/index.js
Outdated
@@ -382,17 +382,20 @@ const analytics = { | |||
s.parentNode.insertBefore( wa, s ); | |||
} | |||
}, | |||
|
|||
identifyUser: function() { | |||
|
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.
L385: Trailing spaces not allowed
client/lib/signup/step-actions.js
Outdated
@@ -239,7 +239,7 @@ module.exports = { | |||
createAccount( callback, dependencies, { userData, flowName, queryArgs, service, token }, reduxStore ) { | |||
const surveyVertical = getSurveyVertical( reduxStore.getState() ).trim(); | |||
const surveySiteType = getSurveySiteType( reduxStore.getState() ).trim(); | |||
|
|||
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.
I bet you can guess ;)
This looks good to me but I don't actually know how the user object/state and signup actions are handled in Calypso. Perhaps someone with more Calypso experience can take a look? @rralian can you take a look or suggest someone? |
I'm happy to take a look at it from here if you don't see any data blockers. |
client/lib/signup/step-actions.js
Outdated
} | ||
|
||
callback( errors, assign( {}, { username: userData.username }, bearerToken ) ); | ||
} ); |
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.
It looks like we lost an indentation level at L256, and thus lost the closing bracket for the conditional on L54.
91bf4b5
to
ca26c4f
Compare
* The destination URL is not always inside Calypso. | ||
* For these cases make sure that a proper redirect is issued. | ||
*/ | ||
if ( /^https?:\/\// ) { |
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.
This works for me, and I can't think of a way that it'd currently mess up. No SSR to worry about. Might be worth adding a note to the destination
explanation in the Signup readme, but other than that, 👍.
This PR aims to properly connect the
anonUserId
and the WPCOM user id.Context: p3Ex-24k-p2
To test:
_aliasUser
event has been properly sent to the analytics backend