Skip to content

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.

    Argument Type Description
    optout Boolean true to opt-out, false to opt back -in

    To disable tracking of the current user:


    To opt back in to being tracked:

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

      (function() {
          var aws = document.createElement('script');
          aws.type = 'text/javascript';
          if (typeof(aws.async) != "undefined") { aws.async = true; }
          aws.src = '{{partner id }},tracking_optout=true';
          var s = document.getElementsByTagName('script')[0];
          s.parentNode.insertBefore(aws, s);