Installation
Paste one snippet into your site's <head>, on every page. How to install the Attributely pixel and confirm it's live.
Your snippet, with your site ID and domains already filled in, is on the Setup page under Install the pixel. It looks like this:
<script>!function(w){w.ar=w.ar||function(){(w.ar.q=w.ar.q||[]).push(arguments)}}(window)</script>
<script async src="https://attributely.co/script.js?uid=YOUR_SITE_ID&domains=yourdomain.com"></script>
Paste it into your site's <head>, on every page — landing pages, login, inside the app. That's the whole rule.
Why every page
An ad click can land anywhere: a blog post, your pricing page, a login page someone bookmarked. If the pixel isn't there, that click is invisible and the revenue it produced gets credited to nothing.
Some tools tell you to install on marketing pages only, then wire up app pages differently. Page lists rot — someone ships a new landing page, forgets the pixel, and attribution quietly breaks. Our rule has no exceptions to remember. The app pages matter most of all: that's where signup and login happen, which is where you identify the user.
What the two lines do
Line 1 creates window.ar as a queue. Any call made before the script finishes loading — say, an identify on a fast signup page — is buffered and replayed once it's ready. Your code never waits for the pixel.
Line 2 loads the pixel itself, async, with its configuration in the URL: uid is your site ID, domains is your verified domain list (see Domains & subdomains).
Single-page apps
Nothing extra to do. The pixel watches route changes and records each one as a pageview. Frameworks that rewrite the same URL repeatedly don't produce duplicates; pageviews are deduplicated by URL.
Using a tag manager
If you deploy through Google Tag Manager or similar, add a Custom HTML tag containing the full snippet — both lines — and trigger it on All Pages. Everything the pixel needs rides on the script tag itself (your site ID and domains are in its URL), so how the tag gets onto the page doesn't matter. Keep the two lines together: the first line is what makes early ar('identify', ...) calls safe.
Confirm it's live
Once the snippet is deployed and a page loads, the Install the pixel step on the Setup page flips to Live with a running event count, and pageviews appear on the Events page.
You don't have to deploy to check your work: events from localhost are accepted and shown on the Events page, labeled as local traffic so they're never mistaken for production visitors. Load your dev site, watch the event arrive, then ship.
If nothing shows up, walk through Troubleshooting. The checks are ordered, and the first two resolve most cases.