Install the tracking script
Find your tracking snippet, paste it into every page of your site, and confirm affixo sees your first visit.
The tracking script is one line of code that goes on your website. When someone arrives through an affiliate's link, it notes which affiliate sent them so the sale can be credited later. You install it once, site-wide, and it keeps working as you add pages.
Before you start#
- You need a way to edit your site's
<head>: your site builder's custom code setting, your theme files, or access to whoever built the site. - Create your first campaign if you haven't. The address in its Where affiliates send traffic field is the site you'll test later. See Create a campaign.
Find your snippet#
Go to SettingsConnectTracking & install. The page has a status line at the top, a Let AI install your tracking card, and four sections you can open:
| Section | What it's for | |---|---| | AI tool guides | A ready-made prompt for Lovable, Bolt, v0, Cursor and other AI builders | | Manual install | Your snippet, plus step-by-step guides for common platforms | | Test your install | A guided click, referral and sale test on your own site | | Signup form | Code to embed your affiliate signup form on your own site |
Open Manual install. Under Your snippet you'll see a line like this, with your own key in place of the placeholder:
<script async src="https://go.affixo.dev/sa.js?w=pk_YOUR_PUBLIC_KEY"></script>
The part after ?w= is your workspace key. It starts with pk_ followed by 32 letters and numbers,
and it's how affixo knows the visit belongs to your program. Always copy the whole line from your
dashboard. A snippet without the key can fail silently.
Tip
In a hurry? Press ⌘ K (or Ctrl K) anywhere in the dashboard and choose Copy tracking snippet.
Install it#
Copy your snippet
In Manual install, copy the script tag under Your snippet.
Paste it into the head of every page
Add it once to the part of your site that every page shares: the site-wide custom code setting
in a builder, or the <head> of your main layout or header template.
Publish
Save and publish your site. A draft or preview isn't enough, because affixo waits for a visit from your live site.
Visit your live site
Open your published site in a normal browser window. Back in affixo, the status line at the top of Tracking & install updates on its own.
Below the snippet, Manual install has a tab for each platform with the exact place to paste:
| Platform | Where the snippet goes |
|---|---|
| WordPress | A header scripts plugin such as WPCode (Header), or your theme's header.php just before the closing head tag |
| Webflow | Project Settings, Custom Code, Head Code |
| Framer | Site Settings, General, Custom Code, End of head |
| Wix | Settings, Custom Code, Add to head, all pages |
| Google Tag Manager | New Tag, Custom HTML, trigger on All Pages, then publish the container |
| Next.js | Your root layout, loaded with next/script |
| React / Vite | The <head> of index.html |
| Vue / Nuxt | index.html, or head.script in nuxt.config |
| Astro | Your base layout's <head> |
| GoHighLevel | A HighLevel version of the snippet. See GoHighLevel, Kajabi and other checkouts |
If your site was built with an AI tool, open AI tool guides instead and paste the prompt into your builder. See Install with Lovable, Bolt, Cursor and other AI builders.
Track signups (optional)#
If people create an account or opt in before they pay, add one more line to the page they see after a successful signup, not the form itself:
<script>
window.Affixo?.track('signup', { email: 'user@example.com' })
</script>
Swap the example address for the real email of the person who just signed up. This records the referral as a lead (no commission yet) and lets affixo match a later payment by the same email. The Referral step of the test checks for it.
Note
You don't need any code to record sales when Stripe is connected. affixo takes each sale, and the amount actually paid after discounts, straight from Stripe. A sale event in the browser never books money on its own: it's recorded as a lead with the buyer's email, which helps match the Stripe payment to the right affiliate.
Check that it's live#
The line at the top of SettingsConnectTracking & install tells you where you stand:
| What it says | What it means | |---|---| | No tracking hits yet | affixo hasn't seen a visit from your site. Check the snippet is published. | | Test hits from localhost only | The snippet works on a local copy of your site, but not on the live one yet. Publish and visit your real domain. | | Tracking installed | affixo received a visit from your published site. It also shows when the last hit came in and from which domain. |
A visit only proves the snippet loads. Before you invite affiliates, run the full click, referral and sale check in Test your tracking, and make sure Stripe sales are credited.
Related#
Questions
Yes. Put it in the head of every page, ideally once in your site-wide header or layout. Affiliates can link to any page, and the snippet has to be on the page they land on to read their referral code. It also needs to be on your signup and checkout pages so those steps can be tied back to the click.
The tag loads with the async attribute, so the browser keeps rendering your page while the script downloads. It doesn't hold up your content.
Some ad blockers and privacy browsers can block tracking scripts, including this one. Sales made with an affiliate's promo code don't depend on the browser at all, and subscription renewals stay with the affiliate who earned the first payment, so those are credited either way.
Each campaign has a Cookie window, 60 days by default. You can set 30, 60, 90 days or a custom number in the campaign's Link and tracking section. Safari and other iOS browsers can clear stored site data after about 7 days without a return visit, so on those browsers an older click may be matched by weaker signals instead.
Yes. Every builder that lets you add custom code to the site head works. Manual install has a tab with the exact menu path for WordPress, Webflow, Framer, Wix, Google Tag Manager, Next.js, React, Vue, Astro and GoHighLevel.
Yes. The key that starts with pk_ is a public key. It only tells affixo which program a visit belongs to. It can't read your data or change anything in your account.
Still stuck?
Send us a note and a person will get back to you, usually within one business day.