Smartlook comes GDPR compliant out of the box. However, if you which to analyse specific data of your European visitors, Smartlook provides you with options to do so. To do so, you must ask for your user's consent.

How to verify user consent

Read more about GDPR in our HELP section. Once the user has given you his or her consent, you can then use our API. The code below needs to be adjusted based on the answer you received from the customer.

At Smartlook we use pop up window to ask for user consent. You should implement similar solution on your site:

Verify if a visitor gave his consent or not by using this code.

<script>
  smartlook(function() {
    console.log(smartlook.consent.api)
    console.log(smartlook.consent.forms)
    console.log(smartlook.consent.ip)
  });
</script>
COPY

There are 3 possible values that you can see in the console:

  1. true if user agreed and provided consent
  2. false if user refused to provide consent
  3. null if user was not asked for consent yet

Form inputs

If the user consented to have his form inputs recorded, use:

<script>
  // in this variable inser your consent
  var consentText = 'Here goes consent text from your website.';

  // choose only one variable
  var clientDecision = true; // if user agreed and provided consent
  var clientDecision = false; // if user refused to provide consent

  smartlook('consentForms', clientDecision ? consentText : false);
</script>
COPY

IP address

If the user consented to have his IP address recorded, use:

<script>
  // in this variable inser your consent
  var consentText = 'Here goes consent text from your website.';

  // choose only one variable
  var clientDecision = true; // if user agreed and provided consent
  var clientDecision = false; // if user refused to provide consent

  smartlook('consentIP', clientDecision ? consentText : false);
</script>
COPY

Identify user via API

If the user consented to being identified via the API, use:

<script>
  // in this variable inser your consent
  var consentText = 'Here goes consent text from your website.';

  // choose only one variable
  var clientDecision = true; // if user agreed and provided consent
  var clientDecision = false; // if user refused to provide consent

  smartlook('consentAPI', clientDecision ? consentText : false);
</script>
COPY

GDPR safe data

You can add atribute data-recording-gdpr-safe to any element that is safe and its numerical data (numbers, prices) are not sensitive.

<p data-recording-gdpr-safe>
  Tesla Model X price is $80,700.
</p>
Did this answer your question?