Integration & Setup

  1. Home
  2. Integration & Setup
  3. Settings & Accounts
  4. Objection Alternatives

Objection Alternatives

Here are two alternative possibilities of objection:

Example 1: Checkbox
<input type=“checkbox“ data-tld=“yourdomain.com“ id=“trackingAllowed“ value=“true“/>
  <span>Tracking erlauben</span>
  <script type=“text/javascript“>
  function initTrackingCheckBox(id)  
{
  var checkBox = document.getElementById(id);
  checkBox.checked = _etracker.isTrackingEnabled();
  checkBox.onclick = function ()  
{
  var tld = this.getAttribute('data-tld');
  this.checked ? _etracker.enableTracking(tld) : _etracker.disableTracking(tld);  
};  
}
  initTrackingCheckBox('trackingAllowed');  
</script>
Example 2: Link

Please extend the example in such a way that the visitor gets feedback after clicking on the link and his action can possibly be undone.

<a href=”javascript:_etracker.disableTracking(‘yourdomain.com’)”>Tracking deaktivieren</a>
Three possible JS-API functions

Three JS-API functions can be used, as shown in the integration examples above:

Check Tracking Status (in response you will get either true or false)

_tracker.isTrackingEnabled()

Disable Tracking Status

_tracker.disableTracking()

Activate Tracking

_tracker.enableTracking()