4based/API
Ads Tracking

Pixel-perfect tracking and attribution for 4based

4based ads tracking fires server-side conversion events to Meta, TikTok, Snapchat and Google the moment a fan converts on your 4based tracking link. Kill losing ads, scale winners, forget iOS signal loss.

MetaTikTokSnapchatGoogle Ads

How does 4based conversion tracking work?

  1. 1

    Ad click

    fbclid / ttclid / ScCid / gclid

    A fan taps your ad and the platform appends its click ID.

  2. 2

    Tracking link

    click ID saved

    The link stores the click ID as first-party data on the fan.

  3. 3

    4based conversion

    subscribe, tip, PPV

    The fan subscribes, tips or buys a PPV message.

  4. 4

    4based API

    hash, dedupe, sign

    We hash identifiers, assign one event_id and sign the event.

  5. 5

    Ad platforms

    Meta, TikTok, Snap, Google

    The server-side event lands in every connected ad account.

Tracking-link revenue

Every tracking link records first-touch and last-touch attribution across 30-day windows.

ROAS by creator

Live dashboards for CPA, ROAS, LTV cohorts and payback period per creator, per ad account, per campaign.

Sub-affiliate tracking

Pass sub1-sub5 params through tracking links and back to the traffic partner via postback.

Event deduplication

One event_id shared by browser pixel and server event, so every platform counts a conversion once.

Attribution stack integrations

Send the same events to Triple Whale, Hyros, Northbeam and RedTrack. No CSV uploads.

Consent-mode ready

IAB TCF v2.2 and Google Consent Mode v2 flags respected end-to-end.

Which 4based events map to which platform?

4based eventMetaTikTokSnapchatGoogle Ads
Tracking link clickPageView / ViewContentClickButtonPAGE_VIEW(page_view)
Free follow / signupLeadSubmitFormSIGN_UPsign_up
New subscriptionSubscribeSubscribeSUBSCRIBEsubscribe (conversion)
RenewalPurchase (value)CompletePaymentPURCHASEpurchase
PPV message purchasePurchase (content_type ppv)CompletePaymentPURCHASEpurchase
TipPurchase (content_type tip)CompletePaymentPURCHASEpurchase
meta-capi.ts
// meta-capi.ts - fire a server-side Subscribe event when a 4based fan converts
await fetch("https://api.4basedapi.com/v1/ads/meta/events", {
  method: "POST",
  headers: { "Authorization": "Bearer sk_live_...", "Content-Type": "application/json" },
  body: JSON.stringify({
    pixel_id: "1234567890",
    event: {
      event_name: "Subscribe",
      event_time: Math.floor(Date.now() / 1000),
      event_id: "4based_sub_abc123",
      action_source: "website",
      user_data: { em: ["<sha256(email)>"], fbc: "fb.1.1699.abc", fbp: "fb.1.1699.987" },
      custom_data: { currency: "USD", value: 9.99, content_ids: ["4based:creator_xyz"] },
    },
  }),
});
tiktok-events.ts
// tiktok-events.ts
await fetch("https://api.4basedapi.com/v1/ads/tiktok/events", {
  method: "POST",
  headers: { "Authorization": "Bearer sk_live_...", "Content-Type": "application/json" },
  body: JSON.stringify({
    pixel_code: "C4XXXXXXXXXXXXX",
    event: "CompletePayment",
    event_id: "4based_sub_abc123",
    context: { user: { email: "<sha256(email)>" }, ad: { callback: "<ttclid>" } },
    properties: { currency: "USD", value: 9.99 },
  }),
});

Snap CAPI and Google Ads use the same shape - see the guides for full payloads.

Frequently asked questions

Meta Conversions API, TikTok Events API, Snapchat CAPI and Google Ads (enhanced and offline conversions), plus GA4. Every subscription, PPV purchase and tip is sent server-side with the original click IDs.

Build with 4based API

Ready to build?

Tell us what you want to automate, measure or build on top of 4based. Agencies, developers and automation teams all get a tailored next step from our team.