We are using lock 10 for angular 4 web app, and we would like to send a google analytics(ga) event on successful signup using lock 10. It seems to me that the lock.on event signup submit
is activated both on success and failure.
So the idea was to send a ga event on logins_count=1
, since login happens after signup, but this attribute is not found when calling lock.getUserInfo(accessToken, callback).
Can we detect a successful signup in others ways or how do we get the logins_count
?
Other approaches are also warmly welcome.
That information about the login count is only available in rules, however, you can add a custom claim to the issued ID token signaling that this is the first authentication event being completed for that end-user and as such the client application could react differently after validating and parsing the ID token.