Connecting CMP and etracker Analytics correctly
In principle, etracker Analytics can be used in standard mode without prior user consent, meaning without a consent banner.
If a Consent Management Platform (CMP) is used, the combination of consent-free tracking without cookies and cookie activation after the user’s consent (post-consent) is recommended. This mix combines the best of both worlds: If users do not allow etracker cookies, the cookie-less mode allows all conversion and traffic data to be measured without the use of cookies. If consent is given, cookies are set. This has the great advantage that the consent does not switch tracking on or off, but only controls the mode for setting cookies.


In order to connect etracker Analytics optimally to your CMP, these two points are important.
1. The CMP must not block the etracker scripts! The tracking code and the event codes must remain executable so that cookie-less tracking is not prevented.
For Cookiebot, Consentmanager.net and OneTrust, a parameter must be added to the tracking & event Code (eCommerce and general) to prevent blocking if auto blocking is activated in the CMP.
Attention: Since this is not possible when integrating via plugins in content management and shop systems, auto blocking should not be used in these cases.
2. Cookie activation should be linked! This is optional, but recommended for best possible data quality.
The connection is easily done to all common CMPs and is explained in detail below:
- Connection to Usercentrics
- Connection to Cookiebot
- Connection to Consentmanager.net
- Connection to OneTrust CookiePro
- Connection to Borlabs Cookie
- Connection to other and own solutions
Connection to Usercentrics
If you do not yet have a Usercentrics account, you can find information about the service packages offered here.
Note: In contrast to the general Usercentrics instructions, please do not make any changes to the etracker code or the etracker <script> tags and in particular leave the type at “text/javascript” to ensure that the cookie-less tracking variant continues running without consent!
In the user interface of Usercentrics under Service Settings → Data Processing Services, add etracker as an additional service.
Version 1
Under Service Settings → Advanced Data Processing Settings, add a new data layer of the type Window Event. Select onConsentStatusChange as the name for the window event. Activate consents_changed for our new event:


Version 2
Add a new Data Layer of type Window Event under Implementation → Data Layer and Events. Use onConsentStatusChange as Name of the Window Event:


For Version 1 and 2: To link the permission for setting etracker cookies with the etracker API call enableCookies or disableCookies, add the following code below the tracking code or the plugin:
<script>
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
function etrackerSetCookieConsent(e) {
var data = e.data || e.detail;
if(data && (data.event === 'consent_changed' || data.event === 'consent_status')) {
if(data['etracker'] === true)
_etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') });
else if (data['etracker'] === false)
_etrackerOnReady.push(function(){ _etracker.disableCookies('mydomain.com') });
}
};
window.addEventListener('onConsentStatusChange', etrackerSetCookieConsent, false);
</script>
Connection to Cookiebot
If auto blocking is used:
Add data-cookieconsent=”ignore” to all etracker <script> tags (tracking code, event trackers and ecommerce tracking scripts) as an additional attribute so that consent-free tracking is not prevented.
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 mode 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="ABCDE" src="//code.etracker.com/code/e.js" async></script>
(The data-secure-code “ABCDEF” is to be replaced by the personal account key)
Attention: Since the adaptation of the etracker scripts is not possible with integration via plugins, auto blocking should not be used with integration via plugin. T
To connect the Cookiebot Statistics category with the etracker API call enableCookies or disableCookies, add the following lines below the tracking code or the plugin:
<script data-cookieconsent="ignore" type="text/javascript">
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
function etrackerSetCookieConsent(e) {
if (Cookiebot.consent.statistics)
_etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') });
else
_etrackerOnReady.push(function(){ _etracker.disableCookies('mydomain.com') });
};
window.addEventListener('CookiebotOnConsentReady', etrackerSetCookieConsent, false);
</script>
Finally, add the cookies set by etracker in Cookiebot after consent has been given according to this list:


Connection to Consentmanager.net
If auto blocking is used:
Add data-cmp-ab=”1″ to all etracker <script> tags (tracking code, event trackers and eCommerce tracking scripts) as an additional attribute to prevent the consent-free tracking from being blocked.
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 mode continues running without consent!
<script data-cmp-ab="1" 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-cmp-ab="1" id="_etLoader" type="text/javascript" charset="UTF-8" data-block-cookies="true" data-respect-dnt="true" data-secure-code="ABCDE" src="//code.etracker.com/code/e.js" async></script>
(The data-secure-code “ABCDEF” is to be replaced by the personal account key).
Attention: Since the adaptation of the etracker scripts is not possible with integration via plugins, auto blocking should not be used with integration via plugin.
To exclude the etracker domains from the automatic blocking of the scripts, make the following settings in the the Consentmanager interface under Edit CMP → Other settings:


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


Then 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.
Connection to OneTrust CookiePro
If auto blocking is used:
Add data-ot-ignore to all etracker <script> tags (tracking code, event trackers and eCommerce tracking scripts) as an additional attribute so that consent-less tracking is not prevented.
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 mode continues running without consent!
<script data-ot-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-ot-ignore id="_etLoader" type="text/javascript" charset="UTF-8" data-block-cookies="true" data-respect-dnt="true" data-secure-code="ABCDE" src="//code.etracker.com/code/e.js" async></script>
(The data-secure-code “ABCDEF” is to be replaced by the personal account key).
Attention: Since the adaptation of the etracker scripts is not possible with integration via plugins, auto blocking should not be used with integration via plugin.
To link the permission for setting etracker cookies with the etracker API call enableCookies or disableCookies, add the following codebelow the tracking code or the plugin. If necessary, the name of the group (here “C0002” for statistics cookies, see also Cookiepedia → Categorizations → Categories in CookiePro) must be adjusted:
<script data-ot-ignore type="text/javascript">
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
function etrackerSetCookieConsent(e) {
var groups = OnetrustActiveGroups.split(',');
if (groups.includes('C0002'))
_etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') });
else
_etrackerOnReady.push(function(){ _etracker.disableCookies('mydomain.com') });
};
function initOneTrustCallback() {
if(typeof OneTrust !== 'undefined')
OneTrust.OnConsentChanged(etrackerSetCookieConsent);
else
window.setTimeout(initOneTrustCallback, 100);
};
initOneTrustCallback();
</script>
Connection to Borlabs Cookie
For Borlabs, the etracker code does not need to be adjusted to prevent blocking:
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: You can find the current etracker cookies here.
Enter the following as the opt-in code in the Borlabs Cookie user interface:
<script type="text/javascript">
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
_etrackerOnReady.push(function(){ _etracker.enableCookies() });
</script>
Enter this as the opt-out code:
<script type="text/javascript">
var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady;
_etrackerOnReady.push(function() { if(_etracker.areCookiesEnabled()) { _etracker.disableCookies(); } });
</script>
Borlabs will play the appropriate code when the settings are changed and when the pages are loaded and will activate or deactivate the setting of cookies.
Connection to other and own solutions
When integrating the etracker code, make sure that it can be executed as type=“text/javascript”.
You can activate the setting of etracker cookies by including the following API call:
_etracker.enableCookies('mydomain.com');
The status of 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 consent that has already been given:
_etracker.disableCookies('mydomain.com');