Skip to main content
Server-side tracking is the recommended method for conversion tracking because it:
  • Can’t be blocked by ad blockers
  • Guarantees delivery of tracking events
  • Confirms actions before tracking (e.g., payment verified)
  • Works with webhooks from payment providers

How It Works

Taapit Visual manual integration

Prerequisites

Important: For conversion tracking to work, users must arrive on your website via a Taapit deeplink. This is how the tracking ID (ta_tid) is generated and passed to your site.
Before you start:
  1. Create a Taapit deeplink pointing to your website or landing page
  2. Enable conversion tracking on your link:
    • Go to your link settings in the Taapit dashboard
    • Enable Conversion Tracking
  3. Get your Secret Key from Settings → Conversion in your Taapit dashboard
Never expose your secret key in client-side code. Use it only on your server.

Installation

Even for server-side tracking, you must install the SDK on your frontend to capture the ta_tid cookie.

Step 1: Frontend - Install the SDK

Add the Analytics component to capture ta_tid:
app/layout.tsx

Step 2: Backend - Set up your API key

.env
Never expose your secret API key in client-side code.

Step 3: Backend - Track conversions

app/api/signup/route.ts

Track a Lead

Track a Sale

trackingId for sales: If the customer was already tracked via a lead event, the trackingId is optional for sale events. You only need to provide the customerExternalId to link the sale to the existing customer. If this is a new customer (no prior lead), trackingId is required.
The amount must be in currency units, not cents.
  • amount: 29.99 for €29.99
  • amount: 2999 (this would be €2999)

API Reference

Endpoints

Authentication

Request Body

When is trackingId required? - Lead events: trackingId is always required - Sale events: - If the customerExternalId was already tracked (via a previous lead event), trackingId is optional - If this is a new customer (no prior lead event), trackingId is required to create the customer record

Response

Best Practices

1. Get tracking ID from multiple sources

2. Always track after confirmation

3. Store tracking ID for later use

4. Log tracking failures

Next Steps

Stripe Integration

Automatic tracking for Stripe (even simpler).

Track Lead API

Full API documentation for leads.

Track Sale API

Full API documentation for sales.