Opt-in and -out of tracking

If you want to stop tracking users you can use one of the following options:
  • using the JavaScript function below that is typically used in integration with a cookie plugin. A few examples can be found here. If the tracking is disabled, the recommendations and search functionalities are not personalized. We will store it 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 function and not a REST-API call for this functionality.
Opt-in & out of tracking
Examples
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(optout);
Argument
Type
Description
optout
Boolean
true to opt-out, false to opt back -in
To disable tracking of the current user:
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(true);
To opt back in to being tracked:
ADDWISH_PARTNER_NS.api.user.set_tracking_optout(false);
  • adding the tracking_optout parameter to the Hello Retail script snippet and setting it to true to prevent any setting of cookies by the Hello Retail script. The result will be the same as calling the opt-out JavaScript function in the Hello Retail JavaScript SDK. The difference between this option and the SDK function is that the SDK function uses a cookie to remember the opt-out while using the tracking_optout parameter allows you to manage cookie consent before Hello Retail is loaded and ensure Hello Retail does not set any cookies at all.
<script>
(function() {
var aws = document.createElement(‘script’);
aws.type = ‘text/javascript’;
if (typeof(aws.async) != "undefined") { aws.async = true; }
aws.src = ‘https://d1pna513xsntoj.cloudfront.net/scripts/company/awAddGift.js#{{partner id }},tracking_optout=true;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(aws, s);
})();
</script>