Tracking user

If you want to get personalized recommendations for a specific user, either via the REST or JavaScript SDK, you will need to supply the specific users Hello Retail tracking ID. This tracking ID is only available through the JavaScript SDK due to the use of cookies for tracking. You will, therefore, need to get this value using the method specified below, and then send it back to your backend to be used for the REST-API.

Note this method is only avaliable through the JavaScript SDK.

Get tracking user
Get tracking user

Simply call the get_tracking_id() function, specifying a callback function - this callback function will be called with the users tracking ID passed along.






The callback function you would like to have called after this function is executed. The tracking user ID is passed as an argument to the callback method.

ADDWISH_PARTNER_NS.api.user.get_tracking_id(function(trackingUserId) {
// We will call your function, as soon as we have the tracking user id.
// Here you can e.g send it directly to your backend using jQuerys ajax helpers:"/url/at/your/backend", {
tracking_user_id: trackingUserId

Please make sure to alter the example code, to ensure the visitors tracking ID are parsed accordingly to you backend – if you intend to use the REST-API to serve the product recommendations yourself, through your backend.