Strict mode tracking

Note: To enable strict mode tracking, please log in to My Oracle Support and create a service request. Review this knowledge base article for more information on enabling strict mode tracking.

Oracle Eloqua's asynchronous tracking scripts allow you to implement strict mode tracking. Enabling strict mode allows you to restrict the tracking of visitors to your web page(s). There are three levels in relation to strict mode tracking scripts:

  • Default tracking: Track all visitors.
  • Require opt-in for visitors by country: Track all visitors except for those from countries on a restricted country list, unless those visitors opt in for tracking via a permissions request.
  • Require opt-in for all visitors: Don't track any visitors, unless those visitors opt in for tracking via a permissions request.

Strict mode helps you comply with the European Union's privacy tracking regulations. Member countries of the EU have legislation in place that requires a marketer to receive explicit opt-in consent to track individuals actions online. If you are conducting a campaign that includes EU member states, then it is your responsibility to determine and set which tracking mode permission request (if any) for each of your web pages.

Code sample: Requiring opt-in for visitors by country

When using the following code, Oracle Eloqua tracks visitors from countries that are not on the Country by IP restriction list, and tracks visitors from restricted countries that have opted-in for tracking:

<script type="text/javascript">
   var _elqQ = _elqQ || [];
   _elqQ.push(['elqSetSiteId', 'siteId']);
   _elqQ.push(['elqTrackPageViewOptinByCountry']);
      (function() {
      function async_load() {
         var s = document.createElement('script');
         s.type = 'text/javascript';
         s.async = true;
         s.src = '//img.en25.com/i/elqCfg.min.js';
         var x = document.getElementsByTagName('script')[0];
         x.parentNode.insertBefore(s, x);
      }
      if(window.addEventListener) window.addEventListener('DOMContentLoaded', async_load, false);
      else if (window.attachEvent) window.attachEvent('onload', async_load);
   })();
</script>

The following code does the same thing as the above snippet, except that it shows a simple default opt-in/out banner at the top of the page to new visitors coming from restricted countries. For visitors who have opted-into tracking, the banner will not be displayed and page views will be tracked. The styling and text of the Opt-in banner can be customized.

<script type="text/javascript">
   var _elqQ = _elqQ || [];
   _elqQ.push(['elqSetSiteId', 'siteId']);
   _elqQ.push(['elqTrackPageViewDisplayOptInBannerByCountry']);
   (function () {
      function async_load() {
         var s = document.createElement('script');
         s.type = 'text/javascript';
         s.async = true; s.src = '//img.en25.com/i/elqCfg.min.js';
         var x = document.getElementsByTagName('script')[0];
         x.parentNode.insertBefore(s, x);
      }
      if (window.addEventListener) window.addEventListener('DOMContentLoaded', async_load, false);
      else if (window.attachEvent) window.attachEvent('onload', async_load);
   })();
      function elqVisitorTrackingOptIn() {
         _elqQ.push(['elqOptIn']);
      }
      function elqVisitorTrackingOptOut() {
         _elqQ.push(['elqOptOut']);
      }
</script>

Important: If strict mode is enabled but you do not have any countries on your restricted country list, then Oracle Eloqua will not track any visitors to the web page even if there is a call for the require opt-in for visitors by country function. After you add countries to the list, Oracle Eloqua will then restrict tracking to those countries. This also affects the tracking of redirect links from emails and landing pages. Learn more from this knowledge base article on how to add countries to the list.

Code sample: Requiring opt-in for all visitors

When using the following code, Oracle Eloqua excludes all visitors from tracking unless they have explicitly opted into tracking:

<script type="text/javascript">
   var _elqQ = _elqQ || [];
   _elqQ.push(['elqSetSiteId', 'siteId']);
   _elqQ.push(['elqTrackPageViewOptinAll']);
   (function () {
      function async_load() {
         var s = document.createElement('script');
         s.type = 'text/javascript';
         s.async = true; s.src = '//img.en25.com/i/elqCfg.min.js';
         var x = document.getElementsByTagName('script')[0];
         x.parentNode.insertBefore(s, x);
      }
      if (window.addEventListener) window.addEventListener
('DOMContentLoaded', async_load, false);
      else if (window.attachEvent) window.attachEvent('onload', async_load);
   })();
</script>

The following code does the same thing as the above snippet, except that it shows a simple default opt-in banner at the top of the page to new visitors. For visitors who have already opted-in to tracking, the banner will not be displayed and page views will be tracked. The styling and text of the Opt-in banner can be customized.

<script type="text/javascript">
   var _elqQ = _elqQ || [];
   _elqQ.push(['elqSetSiteId', 'siteId']);
   _elqQ.push(['elqTrackPageViewDisplayOptInBannerForAll']);
   (function () {
      function async_load() {
         var s = document.createElement('script');
         s.type = 'text/javascript';
         s.async = true; s.src = '//img.en25.com/i/elqCfg.min.js';
         var x = document.getElementsByTagName('script')[0];
         x.parentNode.insertBefore(s, x);
      }
      if (window.addEventListener) window.addEventListener ('DOMContentLoaded', async_load, false);
      else if (window.attachEvent) window.attachEvent('onload', async_load);
   })();
   function elqVisitorTrackingOptIn() {
      _elqQ.push(['elqOptIn']);
   }
   function elqVisitorTrackingOptOut() {
      _elqQ.push(['elqOptOut']);
   }
</script>

Related

Oracle Eloqua asynchronous tracking scripts

Knowledge Base: How to Enable Strict Mode Tracking

Knowledge Base: How to Exclude a Country from Being Tracked when Generating Tracking Scripts