1. Home
  2. Integration & Setup
  3. Consent Management Tools

Consent Management Tools

Consent banner: How to integrate etracker cookie consent correctly

etracker Analytics is provided without cookies by default from version 5.x. The parameter data-block-cookies=”true” in the tracking code prevents etracker cookies from being set.

If you want to activate etracker cookies in order to determine unique visitor numbers and customer journeys, you will need the explicit consent of your website visitors before activating the cookies. You can control this via a content banner.

This is important:

Make sure that the etracker code is integrated in all pages to be measured as described here. The etracker code must not be integrated into the content banner, so that cookie-less tracking is not blocked. Because this can continue to run automatically even if the user does not agree to the setting of cookies, so that you always get the maximum amount of data.

Integration of etracker cookie consent in your own solutions

If you are developing your own cookie consent solution, you can enable tracking with cookies after consent has been obtained by including the following API calls:

_etracker.enableCookies('mydomain.com');

The status, whether cookies are set or not, can be queried with:

_etracker.areCookiesEnabled();

Here “true” or “false” is returned.

This call can be used to revoke an already given consent:

_etracker.disableCookies('mydomain.com'); 

Integration of etracker cookie consent in Usercentrics

Follow the instructions for the Usercentrics implementation.

In the user interface of Usercentrics under Service Settings → Data Processing Services you add etracker as an additional service. Remember the template ID shown there.

Under Service Settings → Advanced Data Processing Settings you add a new data layer of type Window Event. As name for the window event choose onConsentStatusChange and for the events switch on consents_changed.

To link the permission to set etracker cookies with the etracker API call enableCookies or disableCookies, add the following code below the tracking code to your pages and adjust the template ID if necessary:

<!-- set etracker cookie settings according to CMP --> 
  <script type="text/javascript">
    function etrackerSetCookieConsent() {
      if(typeof usercentrics !== 'undefined') {
        try {
          var cs = usercentrics.getConsents('PPkCxv14a');
          if(cs && cs.consentStatus)
            _etracker.enableCookies();
          else
            _etracker.disableCookies();
        } catch {}
      }
    };
    window.addEventListener('onConsentStatusChange', etrackerSetCookieConsent, false);
  </script>

Integration of etracker cookie consent in Cookiebot

Follow the instructions for the Cookiebot implementation. The Cookiebot script can be implemented in automatic or manual mode.

Then add data-cookieconsent=”ignore” as an additional attribute in the etracker code, so that the tracking code is not disabled in auto mode. Please do not make any further changes to the etracker code and especially leave the type at “text/javascript” to ensure that the cookie-less tracking variant continues to run without consent!

<!-- Copyright (c) 2000-2020 etracker GmbH. All rights reserved. -->
<!-- This material may not be reproduced, displayed, modified or distributed -->
<!-- without the express prior written permission of the copyright holder. -->
<!-- etracker tracklet 5.0 -->
<script type="text/javascript">
// var et_pagename = "";
// var et_areas = "";
// var et_tval = 0;
// var et_tsale = 0;
// var et_tonr = "";
// var et_basket = "";
</script>
<script data-cookieconsent="ignore" id="_etLoader" type="text/javascript" charset="UTF-8" data-block-cookies="true" data-respect-dnt="true" data-secure-code="ABCDEF" src="//static.etracker.com/code/e.js"></script>
<!-- etracker tracklet 5.0 end -->

(The data-secure-code “ABCDEF” has to be replaced by the personal account key)

Now add the following lines below the tracking code to link the Cookiebot Statistics category with the etracker API call enableCookies or disableCookies:

<!-- set etracker cookie settings according to CMP -->
  <script type="text/javascript">
    function etrackerSetCookieConsent(e) {
     if (Cookiebot.consent.statistics)
      _etracker.enableCookies();
     else
      _etracker.disableCookies();
    };
    window.addEventListener('CookiebotOnConsentReady', etrackerSetCookieConsent, false); 
  </script>  

Integration of etracker cookie consent in Consentmanager.net

Follow the instructions for the consentmanager.net implementation. No changes to the etracker tracking code are necessary!

After the initial scan of the site by Consentmanager.net an entry etracker GmbH can be found under CMP → Vendors. You will need the corresponding ID for this entry (e.g. s987) later. As Purpose you choose Measurement, as Legal Type you choose Legitimate Interests (GDPR 6.1.f).

To link the permission to set etracker cookies with the etracker API call enableCookies or disableCookies, add the following code below the tracking code to your pages as well as the above mentioned ID:

<!-- set etracker cookie settings according to CMP -->  
  <script type="text/javascript">
    function etrackerSetCookieConsent(e,o) {
      var cs = __cmp('getCMPData');
      if('s987' in cs.vendorConsents && cs.vendorConsents['s987'])
        _etracker.enableCookies();
      else
        _etracker.disableCookies();
    };
    __cmp('addEventListener',['consent',etrackerSetCookieConsent,false],null);
  </script>

Integration of etracker cookie consent in OneTrust CookiePro

Follow the instructions for the OneTrust CookiePro implementation.

To link the permission to set etracker cookies with the etracker API call enableCookies or disableCookies, add the following code below the tracking code to your pages. You may need to change the name of the group (here “2” for statistic cookies):

  <!-- set etracker cookie settings according to CMP -->  
  <script type="text/javascript">
  function etrackerSetCookieConsent() {
    var groups = OnetrustActiveGroups.split(',');
    if (groups.includes('2'))
      _etracker.enableCookies();
    else
      _etracker.disableCookies();
  };
  OneTrust.OnConsentChanged(etrackerSetCookieConsent);
  </script>

Integration of etracker cookie consent in Borlabs Cookie

Create a new entry for etracker in Borlabs Cookie in the graphical user interface under Cookies:

Name: etracker
Provider: etracker GmbH
Purpose: Statistics Cookie Name: The current etracker cookies can be found here.

As opt-in code you enter the following in the Borlabs Cookie user interface:

  <script type="text/javascript">
    if (typeof _etracker !== 'undefined') {
      _etracker.enableCookies();
    }
  </script>

As opt-out code you enter this:

<script type="text/javascript">
    if (typeof _etracker !== 'undefined' && _etracker.areCookiesEnabled()) {
      _etracker.disableCookies();
    }
  </script>

Borlabs will automatically play the appropriate code when changing settings and loading pages, and enable or disable the setting of cookies.