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 function specified below, and then send it back to your backend to be used for the REST-API.
Call the get_tracking_id() function, specifying a callback function - this callback function will be called with the user tracking ID passed along.
This function is only available through the JavaScript SDK.


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 function.


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 jQuery ajax helpers:"/url/at/your/backend", {
tracking_user_id: trackingUserId
Please make sure to alter the example code, to ensure the visitors tracking ID is parsed accordingly to your backend – if you intend to use the REST-API to serve the product recommendations yourself through your backend.