Rich-text Reply

Track users through signup and reconcile userId

Marco 12-14-16

Track users through signup and reconcile userId

While testing a signup flow, the user is bucketed as a logged out user while the goal is tracked when the user is logged in.

How can I uniquely identify that user using Optimizely X (JS SDK)?

 

More specifically, how do I bucket a user when he is not logged in? What should the userId be?

var variation = optimizelyClientInstance.activate(experiment, userId);
Level 1

David_Orr 12-16-16
 

Re: Track users through signup and reconcile userId

Hi there,

>More specifically, how do I bucket a user when he is not logged in? What should the userId be?

A visitor's user ID can be found in the object that is pushed when window["optimizely"].get( visitor ); is evaluated under the "visitorID" property.

Here is a link to our dev docs for more info on how to use our Optimizely:

https://developers.optimizely.com/x/solutions/javascript/reference/index.html#function_getvisitor

The userID can also be found in the visitor's browser's cookie under "optimizelyEndUserId".
Senior Technical Support Engineer
Optimizely