Install the Faraday Pixel

Before you start, Visitor Context must be turned on for your account, and you need a Faraday Pixel dataset. See Visitor Context for how to create one.

Add the tag to every page of your site using the instructions below. Replace <site_id> with the dataset's site_id; the Faraday Pixel dataset's Definition tab shows the tag with it filled in. Once the tag is in place, new identified visitors appear in the dataset on its next refresh.

  1. In Google Tag Manager, create a Custom HTML tag and paste in the tag below.
  2. Set it to fire on page views (All Pages).
  3. Publish the container.
<!-- Initialize queue and set global custom data BEFORE SDK loads -->
<script type="text/gtmscript">
!function(e) {
  e._oirtrk = e._oirtrk || [];
  e._oirtrk.push(['set', 'site_id', '<site_id>']);
}(window);
</script>
<!-- Load SDK -->
<script type="text/gtmscript">
  !(function (s) {
    let o = s.createElement('script'), u = s.getElementsByTagName('script')[0];
    o.src = 'https://cdn.aggle.net/oir/oir.min.js';
    o.async = !0, o.setAttribute('oirtyp', '6311ae17'), o.setAttribute('oirid', 'PPDP395B7');
    u.parentNode.insertBefore(o, u);
  })(document);
</script>

Consent

The pixel matches visitors to known contacts for marketing, which privacy laws such as CCPA and GDPR may treat as a sale or share of personal information. If your site has a cookie consent banner, load the tag only after the visitor accepts marketing cookies, and honor opt-outs and Global Privacy Control.

Leave the tag off logged-in portals and any page that collects health information. See HIPAA data.

Content Security Policy

If your site sends a Content Security Policy, add these sources to it:

Content-Security-Policy: script-src 'self' cdn.aggle.net lijit.com *.lijit.com liadm.com *.liadm.com alocdn.com *.alocdn.com nytrng.com *.nytrng.com; frame-src 'self' lijit.com *.lijit.com liadm.com *.liadm.com alocdn.com *.alocdn.com nytrng.com *.nytrng.com; img-src 'self' *.aggle.net lijit.com *.lijit.com liadm.com *.liadm.com alocdn.com *.alocdn.com nytrng.com *.nytrng.com; connect-src 'self' *.aggle.net lijit.com *.lijit.com liadm.com *.liadm.com alocdn.com *.alocdn.com nytrng.com *.nytrng.com

The lijit.com, liadm.com, alocdn.com and nytrng.com sources cover partner pixels the tag loads. That list can change, so watch your CSP violation reports for new domains.

Check that it's working

  1. Install the tag in staging first and tell your Faraday contact. Faraday will then confirm that events are arriving before you move the tag to production.
  2. Open a page of your site with your browser's developer tools open, accept marketing cookies, and turn off any ad blocker. The Network tab should show a request for oir.min.js from cdn.aggle.net. You can also search the Network tab for your site_id.
  3. After the dataset's next refresh (once a day by default), identified visitors appear in it. Not every visitor is identified, so your own test visit may not appear.

Troubleshooting

  • The script doesn't load. Check that the tag is published, that it fires on all pages, and that you accepted the consent category it's behind. An ad blocker can also block it.
  • The browser console shows CSP errors. Add the sources above to your Content Security Policy, plus any new domain your violation reports name.
  • You don't want to wait for the daily refresh. Choose Force update from the dataset's ... menu to refresh it now.
  • The script loads, but no visitors appear after a day. Sites with little traffic may see few identified visitors at first. If none appear after a few days, contact your account team.