SetupInstalling the Tag

Installing the Tag

Install the CleanClicks JavaScript tag on your website to capture sessions, click IDs, UTM parameters, and conversion events.

The CleanClicks tag is a small JavaScript file that runs on your website. It captures visitor sessions, click IDs, UTM parameters, and conversion events, then sends them through your first-party subdomain.

The Script Tag

<script src="https://cleanclicks.yourdomain.com/__cc/cc.js" defer></script>

Replace yourdomain.com with your actual domain. The defer attribute ensures the script doesn't block page rendering.

Where to Install It

The tag should be in the <head> section of every page on your site. How you do that depends on your platform.

Custom HTML / Static Sites

Add the script tag directly to your HTML <head>:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Your Site</title>
  <!-- CleanClicks tag -->
  <script src="https://cleanclicks.yourdomain.com/__cc/cc.js" defer></script>
</head>
<body>
  ...
</body>
</html>

If you use a template or layout file that's shared across pages, add it there once.

Tag Manager (Google Tag Manager)

  1. In GTM, create a new Custom HTML tag
  2. Paste the script tag
  3. Set the trigger to All Pages
  4. Publish the container

Note: While GTM works, direct installation is preferred. GTM adds a layer of indirection that can be blocked by some ad blockers, partially defeating the purpose of first-party tracking.

React / Next.js / SPA Frameworks

For single-page applications, add the script to your root HTML file (index.html, _document.tsx, etc.):

<script src="https://cleanclicks.yourdomain.com/__cc/cc.js" defer></script>

The script handles SPA navigation automatically.

Shopify

Shopify uses a Custom Pixel, which has its own setup flow. See Shopify Setup for the full guide.

WordPress

WordPress uses a dedicated plugin. See WordPress Setup for the full guide.

Verifying Installation

After installing the tag:

  1. Visit your website in a browser
  2. Open Developer Tools (F12 or right-click > Inspect)
  3. Go to the Network tab
  4. Reload the page
  5. Search for cc.js
  6. You should see a request to cleanclicks.yourdomain.com/__cc/cc.js with a 200 status

You can also use the Detect Tag feature in the onboarding wizard or check the Domains page for tag detection status.

What the Tag Does

The CleanClicks tag:

  • Captures click IDs from ad platforms (gclid, fbclid, ttclid, li_fat_id, msclkid)
  • Captures UTM parameters for attribution
  • Manages session tracking with first-party cookies
  • Fires conversion events based on your configured triggers
  • Sends all data through your first-party subdomain

It does NOT:

  • Collect personal information unless explicitly configured
  • Slow down your page (it's loaded with defer and is lightweight)
  • Interfere with other scripts or tag managers
  • Set any third-party cookies

Next: Verifying Installation