Opt-in and out of tracking
If you want to stop tracking users you can use the method below. Typically this JavaScript method is used in integration with a cookie-plugin. A few examples can be found here.
If you disable tracking then the recommendations and search functionality won't be personalized. We will store on a cookie that the user doesn't want to be tracked, so you only need to set this once.
Note: Since tracking is done through Cookie, there is only a JavaScript SDK method and not a REST-API call for this functionality.
Opt-in & out of tracking
Examples
1
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(optout);
Copied!
Argument
Type
Description
optout
Boolean
true to opt out, false to opt back in
To disable tracking of the current user:
1
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(true);
Copied!
To opt back in to being tracked:
1
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(false);
Copied!
Last modified 1yr ago
Copy link