Integration & Setup

  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.

Please note that the use of consent management solutions that process the IP address on servers of a company whose headquarters are located in the USA is not in compliance with the GDPR. See also the ruling of the Wiesbaden Administrative Court.

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>
  function etrackerSetCookieConsent(e) {
    var data = e.data || e.detail;
    if(data && (data.event === 'consent_changed' || data.event === 'consent_status') && typeof _etracker !== 'undefined') {
      if(data['etracker'] === true)
        _etracker.enableCookies('mydomain.com');
      else if (data['etracker'] === false)
        _etracker.disableCookies('mydomain.com');
    }
  };
  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.

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

<script data-cookieconsent="ignore" 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="//code.etracker.com/code/e.js" asnyc></script>

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

To connect the Cookiebot statistics category with the etracker API call enableCookies or disableCookies, add the following lines below the tracking code:

<script data-cookieconsent="ignore" type="text/javascript">
    function etrackerSetCookieConsent(e) {
     if (Cookiebot.consent.statistics)
      _etracker.enableCookies('mydomain.com');
     else
      _etracker.disableCookies('mydomain.com');
    };
    window.addEventListener('CookiebotOnConsentReady', etrackerSetCookieConsent, false); 
  </script>  

As a last step, you add the cookies set by etracker in Cookiebot according to this list:

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!

In the ConsentManager interface, enter etracker GmbH with the purpose of Measurement under CMPs → Provider:

Next, activate the etracker consent mode under Add/Edit CMP → Other Settings to activate etracker cookies upon consent:

Please note: Settings in the ConsentManager interface only take effect after approx. 10 minutes.

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.