Skip to content
SourceLoop
Tracking pixel

Install the SourceLoop tracking pixel

Add the SourceLoop tracking script to your site in three steps. Once installed, every visitor's source, journey, and conversion gets captured automatically.

On this page
  1. Before you start
  2. Step 1: Copy the tracking snippet
  3. Step 2: Paste it into your site’s <head>
  4. Step 3: Deploy and reload
  5. Verify it’s working

This guide walks you through adding the SourceLoop tracking pixel to your site. Once installed, SourceLoop captures every visitor’s source, journey, and any conversion (form submission, meeting, chat, payment) they trigger.

Three steps, around five minutes. Works on every CMS, every framework, every static-site generator.

Before you start

You’ll need:

  • A SourceLoop account (sign up here if you don’t have one yet)
  • Access to your site’s <head> HTML (or a tag manager like GTM)
  • A published page to test against once it’s live

Step 1: Copy the tracking snippet

  1. Sign in to SourceLoop.
  2. In the left sidebar, open Setup -> Tracking code.
  3. Copy the snippet shown on the page.
SourceLoop Setup page with the tracking code snippet ready to copy

The snippet looks like this:

<script>
  window.SourceLoopConfig = { websiteId: "YOUR_WEBSITE_ID" };
</script>
<script async src="https://app.sourceloop.ai/tracking-v3.js"></script>

The websiteId is unique to your workspace and is filled in automatically when you copy from the app. Don’t share the snippet publicly, anyone who has it could send fake events to your account.

Step 2: Paste it into your site’s <head>

Add the snippet inside <head> on every page. The exact location depends on your stack:

  • Webflow: Project Settings -> Custom Code -> Head Code
  • WordPress: Use the “Insert Headers and Footers” plugin (or “WPCode”), or paste into your active theme’s header.php just before </head>
  • Next.js / Nuxt / Remix: Paste into the root layout file’s <head> (e.g., app/layout.tsx, nuxt.config.ts)
  • Astro: Add to the global layout’s <head> (e.g., src/layouts/BaseLayout.astro)
  • Shopify: Online Store -> Themes -> Actions -> Edit Code -> theme.liquid, paste before </head>
  • BigCommerce: Storefront -> Script Manager -> Create a script, set placement to <head> on All Pages
  • Wix: Settings -> Custom Code -> Add Custom Code, placement <head>, apply site-wide
  • Squarespace: Settings -> Advanced -> Code Injection -> Header
  • Framer: Site Settings -> General -> Custom Code -> Start of <head> tag
  • Google Tag Manager: New Tag -> Custom HTML -> paste the snippet, trigger on All Pages
  • Plain HTML / custom build: Paste directly into your site template’s <head>

Step 3: Deploy and reload

Push the change live, then open your site in an incognito window (regular browsers may cache the old version of the page without the new snippet).

That’s it. Visitors hitting your site from this point on are being tracked by SourceLoop, source, journey, and any conversions they trigger.

Verify it’s working

Want to make sure the script is firing correctly? Head to Verify the tracking pixel is installed for the two-minute check.

If you’re stuck, email us at [email protected] with your domain and we’ll take a look.

Frequently asked questions

  1. Where exactly does the script go?

    Inside the `<head>` tag of every page you want to track. Put it before any other analytics scripts so SourceLoop loads first.

  2. Does the script slow down my site?

    The tracker is under 8KB gzipped and loads async, so it has no measurable impact on Core Web Vitals. SourceLoop also pre-connects to `app.sourceloop.ai`, which shaves another ~80ms off the handshake.

  3. What if I'm using Google Tag Manager?

    Create a Custom HTML tag, paste the snippet, and set the trigger to "All Pages". Make sure the tag fires before any consent management platform that might block scripts.

  4. Do I need to install the script on every page?

    Yes, on every page you want SourceLoop to track. Site-wide install in `<head>` is the simplest path, every CMS and framework supports it. Forms, meetings, chats, and payments only get attributed on pages where the snippet is loaded.

  5. My site uses a strict Content Security Policy. Will SourceLoop be blocked?

    If your CSP doesn't already allow `app.sourceloop.ai`, the browser will block the script. Add `app.sourceloop.ai` to your `script-src` and `connect-src` directives. The browser console will show a CSP violation if this is the cause.

  6. I have multiple websites under one SourceLoop workspace. Do I install the same snippet on all of them?

    No. Each website in SourceLoop gets its own `websiteId`. Switch the active website in the dashboard before copying the snippet, the snippet shown is scoped to that specific website.

Track every conversion to its true source

Capture and send full attribution data from every signup, lead, booking, and sale to your CRM and ad platforms, so you know exactly what's driving revenue.

Without SourceLoop

Untagged

Kayden Floyd

kayden@abc.com

  • SourceUnknown
  • MediumUnknown
  • CampaignUnknown
  • Landing pageUnknown
Journey
No touchpoints captured

With SourceLoop

Auto-tagged

Kayden Floyd

kayden@abc.com · Acme Co.

  • Channel Paid Social
  • CampaignFree_demo
  • Landing page/pricing
Journey
Synced to HubSpot Google Ads Meta