Atribu
Getting Started

Install the Tracking Script

Add the Atribu tracker to your website to capture visitors, sessions, and conversions

The Atribu tracking script is a lightweight JavaScript snippet that runs on your website. It captures:

  • Page views -- which pages visitors see and how long they stay
  • Visitor identity -- assigns each device a unique anonymous ID so you can follow the journey across visits
  • Traffic sources -- reads UTM parameters and click IDs (fbclid, gclid) from your ad URLs to know which campaign brought each visitor
  • Form submissions -- automatically detects when someone fills out a form and extracts their email or phone number
  • Booking completions -- detects GoHighLevel, Calendly, and Cal.com booking widgets

Installation

Go to Settings > Tracking in your Atribu dashboard. You will see your personalized tracking snippet with your unique tracking key already filled in. Copy it and install it using one of the methods below.

Paste the snippet into the <head> section of every page on your site. If you use a CMS like WordPress, Webflow, or Squarespace, look for the "Custom Code" or "Header Code Injection" setting.

Tracking snippet
<script>
  window.ATRIBU_TRACKING_KEY = "your-tracking-key-here";
  window.ATRIBU_TRACKING_ENDPOINT = "https://www.atribu.app/api/tracking/collect";
  window.ATRIBU_INTERCEPT_FBQ = true;
  window.ATRIBU_META_BRIDGE_PAGEVIEW = false;
  window.atribuTracker = window.atribuTracker || function() {
    (window.atribuTracker.q = window.atribuTracker.q || []).push(arguments);
  };
</script>
<script src="https://www.atribu.app/atribu-tracker.js" defer></script>

Use your actual snippet

The code above is a template. Copy your real snippet from Settings > Tracking -- it has your tracking key pre-filled.

The defer attribute ensures the script loads without slowing down your page. Events that happen before the script finishes loading are queued and sent once it is ready.

Create a new tag

In Google Tag Manager, go to Tags > New and select Custom HTML as the tag type.

Paste the snippet

Copy your tracking snippet from Settings > Tracking in Atribu and paste it into the HTML field.

Custom HTML tag content
<script>
  window.ATRIBU_TRACKING_KEY = "your-tracking-key-here";
  window.ATRIBU_TRACKING_ENDPOINT = "https://www.atribu.app/api/tracking/collect";
  window.ATRIBU_INTERCEPT_FBQ = true;
  window.ATRIBU_META_BRIDGE_PAGEVIEW = false;
  window.atribuTracker = window.atribuTracker || function() {
    (window.atribuTracker.q = window.atribuTracker.q || []).push(arguments);
  };
</script>
<script src="https://www.atribu.app/atribu-tracker.js" defer></script>

Set the trigger

Set the trigger to All Pages so the tracker loads on every page of your site.

Publish

Click Submit to publish the container. The tracker will start collecting data immediately.

Shopify's Web Pixel system provides a sandboxed environment for third-party scripts.

Go to Customer Events

In your Shopify admin, navigate to Settings > Customer Events.

Add a custom pixel

Click Add custom pixel and give it a name like "Atribu Tracker".

Paste the snippet

Copy your tracking snippet from Settings > Tracking in Atribu and paste it into the code editor.

Save and connect

Click Save, then toggle the pixel to Connected.

Shopify limitations

Shopify's Web Pixel runs in a sandboxed iframe. Form auto-capture and booking widget detection may not work inside the sandbox. For full functionality, consider adding the tracker via the theme's theme.liquid file instead (paste it before the closing </head> tag).

How the tracker works

IDs and cookies

The tracker creates two identifiers for each visitor:

  • Anonymous ID (atribu_visitor_id cookie) -- A unique ID for each device/browser. Persists for 1 year. This is how Atribu counts unique visitors.
  • Session ID (atribu_session_id cookie) -- A unique ID for each visit. Resets after 30 minutes of inactivity or when the visitor arrives from a new marketing source (different UTM parameters or click ID). This is how Atribu counts sessions.

Both IDs are stored as first-party cookies so server-side code (like checkout pages) can read them and pass them to payment providers for better attribution.

Automatic features

The tracker automatically captures these events without any extra code:

FeatureWhat it does
Page viewsTracks every page the visitor sees, including single-page app navigation
Form submissionsDetects form submissions, extracts email/phone, and links the anonymous visitor to a known customer
Booking widgetsDetects GoHighLevel, Calendly, and Cal.com booking completions
Stripe checkout redirectsDetects ?session_id=cs_* in the URL after a Stripe Payment Link redirect
Outbound link clicksTracks clicks to external domains
File downloadsTracks downloads (PDF, ZIP, etc.)
EngagementMeasures scroll depth and time on page

The identify() call

The most important thing the tracker does is link anonymous visitors to known customers. When someone fills out a form on your site, the tracker automatically calls identify() with their email or phone number. This creates a connection between the anonymous browser visitor and the customer record in your CRM or payment provider.

Without this link, Atribu cannot attribute a Stripe payment back to the original ad click. Form auto-capture handles this automatically for standard HTML forms. If you use a custom form (React, Vue, etc.), you can call identify() manually:

Manual identify call
window.atribuTracker.identify({
  email: "[email protected]",
  phone: "+1234567890"
});

Verify it is working

After installing the tracker:

  1. Visit your website in a browser (not incognito -- some ad blockers are more aggressive there)
  2. Open your Atribu dashboard
  3. Check the Online Now counter in the top right -- you should see at least 1 visitor
  4. After a few minutes, page views and sessions will appear in the dashboard

Ad blockers

Some browser ad blockers may block the tracking script. If you or your team use ad blockers, you may not see your own visits. To ensure the tracker works for all visitors -- including those with ad blockers -- set up a custom tracking domain. This routes tracking requests through your own domain instead of atribu.app, which ad blockers do not block.

Go to Settings > Tracking > Custom Domain to set this up.

Next steps

On this page