Although not a legal requirement for example for GDPR compliance, you can disable Nosto for a given customer if they don't give consent for data processing or if legal reasons such as COPPA requires to disable Nosto for an individual. 

This method disables the initialization of Nosto entirely, meaning that  all associated the Nosto features on your web store for that user are also disabled.

If you are using the Nosto snippet, you'll need to change the way the script is initialized:

<script type="text/javascript">
if (document.cookie.indexOf('accepts_marketing') >= 0) {
    nostojs.init("nostoAccountId");
}
</script>

If you are using the one-line include script, you'll need to wrap the entire script in a conditional

<script type="text/javascript">
if (document.cookie.indexOf('accepts_marketing') >= 0) {
  var head = document.getElementsByTagName('head')[0];
  var js = document.createElement("script");
  js.type = "text/javascript";
  js.src = "//connect.nosto.com/include/$accountID";
  head.appendChild(js);
}
</script>

The examples above simply check for the existence of a cookie called accepts_marketing but you can change the conditional to check for anything.

Did this answer your question?