Basic page view tracking with third-party cookies

When you visit a website where Oracle Eloqua asynchronous tracking scripts deployed, cookies are placed in your browser. Cookies help websites remember information about your visit and help personalize your next visit.

In a third-party cookie implementation, the domain of the cookie placed in the browser is different than the domain being visited. For example, if you visit example.com and the domain of the cookie placed on your computer is eloqua.com, then this is a third-party cookie. If it the domain of the cookie is example.com, this is a first-party cookie.

Using third-party cookies can be problematic. Third-party cookies are often:

  • Blocked by anti-spyware applications
  • Blocked by browsers and default privacy settings

Code sample: Implementing third-party cookies

The following code sample illustrates how to implement third-party cookies on your website.

<script type="text/javascript">
    var _elqQ = _elqQ || [];
    _elqQ.push(['elqSetSiteId', 'siteId']);
    _elqQ.push(['elqTrackPageView']);
	
    (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>

When implementing the code sample, note the following:

  • _elqQ is a queue of commands to push to Oracle Eloqua servers. After the scripts have been loaded into the DOM, the commands are queued up and executed in order.
  • The script can be placed anywhere on the page. Since the scripts are executed asynchronously, it does not matter where they are placed on the page. However, if you plan to use other features like data look ups or strict mode, _elqQ must be defined before it is used.

Related

Oracle Eloqua asynchronous tracking scripts

Basic page view tracking with first-party cookies