JavaScript tracker

Start tracking partner sales with a copy-and-paste snippet and no backend changes.

  • First-party cookie
  • One snippet for all pages
  • Works with single-page apps
  • Pairs with postbacks

21 days with every live feature. No card needed.

Sample snippet

The order page calls the tracker

Order confirmation page

trackspot('conversion', {
  amount: 49.00,
  currency: 'USD',
  orderId: 'A-1001'
})
Click ID from cookie
clk_7Q2M
Cookie
First-party, on your domain
Result
Conversion for partner #104

Teams that work with us

  • RE/MAX
  • PayPro Global
  • Solitics
  • Entail
  • Zik Analytics
  • Henko Media
  • Atriis
  • AbsoluteBet
  • MailPipe
  • Cosmo Clinic

JavaScript tracker in detail

Add one script to your site to save the click ID in a first-party cookie and record conversions from the browser.

What the script does

The tracker reads the click ID from the landing page URL and saves it in a first-party cookie on your own domain. When the visitor converts, a call to the tracker sends the saved click ID and the order details to trackspot.ai. A basic setup needs no backend work and no developer time beyond pasting the snippet.

Record a conversion

On your order confirmation page, call the tracker with the amount, currency and order ID. For example: trackspot('conversion', { amount: 49.00, currency: 'USD', orderId: 'A-1001' }). The tracker adds the click ID from the cookie and sends the request. The order ID stops a page reload from creating a second conversion.

When to use a server postback

Browser tracking works only if the page loads and the cookie is still there. Payments that finish on a hosted checkout, in a mobile app or in a backend job are better tracked with a server-to-server postback. Many merchants use both: the script saves the click ID and the server sends the conversion.

Set it up in 5 steps

Each step names the screen in your dashboard. Guides with screenshots are in the help center.

Open the help center

  1. Go to Settings → Tracking → JavaScript tracker and copy the snippet.

  2. Paste the snippet into the head of every page on your site.

  3. Add the conversion call to your order confirmation page.

  4. Click a test tracking link and finish a test order.

  5. Check Reports → Conversions for the test order.

What partner teams tell us

We will publish named customer stories here once customers approve them. Until then, this is a sample quote.

Customer stories

Sample quote
“We moved our postbacks to server-side and stopped arguing with partners about missing sales.”
Head of partnerships, B2B SaaS company

Questions about JavaScript tracker

Does the tracker work across subdomains?

Yes. Set the cookie domain to your root domain, for example .yourbrand.com, and the click ID is readable on www, shop and app subdomains.

Does the script slow down my pages?

The script loads asynchronously, so it does not block your page from rendering.

Try JavaScript tracker on your own program

It is in the 21-day trial with every other live feature. Send your first server-to-server postback and see real conversions on day one.