4based Meta Conversions API is the server-side bridge between your 4based tracking links and your Meta ad account. This guide explains how the integration works, what you need before you start, how to set it up step by step, and how to verify that every conversion is counted exactly once.
Browser-only tracking misses a large share of conversions on creator platforms: fans click an ad on mobile, land on a tracking link, and subscribe later inside an in-app browser or on another device. Cookie restrictions, ad blockers and iOS privacy features break the chain. Server-side events from 4based API close that gap by sending the conversion directly from our infrastructure to Meta, tied back to the original click.
4based API is an independent developer platform. The 4based events described here are part of the 4based API product's normalized event model and are delivered through your own Meta credentials.
What you get
- Server-side Meta conversions for subscriptions, renewals, PPV purchases and tips
- Automatic fbclid capture on every 4based tracking link
- Deduplication against the browser pixel with one shared event_id
- Per-creator ROAS, CPA and LTV reporting in the 4based API dashboard
How does 4based Meta Pixel and Conversions API tracking work?
- 1
Ad click
A fan taps your Meta ad and Meta appends fbclid to the URL.
- 2
Tracking link
Your 4based tracking link saves fbclid as a first-party value for 90 days.
- 3
4based conversion
The fan subscribes, renews, buys a PPV message or sends a tip on 4based.
- 4
4based API
We hash identifiers, assign one event_id, apply consent and sign the event.
- 5
Meta
The event is posted to Meta and appears in reporting within minutes.
Before you start
- An active Meta ad account with admin or advertiser access
- Your dataset (pixel) ID
- A system-user Conversions API access token
- At least one 4based tracking link for the creator you are promoting
- A 4based API key from your dashboard (request access if you do not have one yet)
Step-by-step setup
1. Create the pixel or dataset
Open Meta Events Manager, create a new dataset (pixel) for the creator's funnel and copy its ID. One dataset (pixel) per creator keeps reporting clean, but agencies can also share one across a roster.
dataset (pixel) ID: 1234567890
Status: Active
Source: Website
2. Generate the access token
In the dataset (pixel) settings generate a system-user Conversions API access token. Store it like a password: anyone who has it can send events to your account.
Token: EAAG....(hidden)
Created: today
Permissions: send events
3. Connect in the 4based API dashboard
Open Ads Tracking in the dashboard, choose Meta, paste the dataset (pixel) ID and token, and pick which creators the connection applies to. 4based API validates the credentials immediately.
Meta: Connected
Creators: 3 selected
Validation: OK
4. Add the tracking link to your ads
Use your 4based tracking link as the destination URL in every Meta ad. Do not strip query parameters: fbclid must reach the landing page. Add the click capture snippet below if you host your own landing page.
Destination: link.example.com/summer
Auto-tag: fbclid on
UTM: preserved
5. Map 4based events
Review the default mapping from 4based events to Meta events and turn on the events you want to optimize for. Values and currency are filled in automatically from the transaction.
Subscribe: on
Purchase (PPV, tip, renewal): on
Lead: on
6. Send a test event
Use Events Manager > Test events to get a test code, paste it into the dashboard and send a test event. A good result appears within a minute and shows the expected identifiers.
Test event: Purchase
Status: Received
Matched identifiers: 4
Capture the click ID
Fans may convert hours or days after the click, so fbclid must survive the session. If you use a 4based API hosted tracking link this happens automatically. If you run your own landing page, add this snippet. It reads fbclid from the URL and stores it in a first-party cookie for 90 days.
// capture-click-id.ts - runs on your tracking-link landing page
const PARAMS = ["fbclid"];
const NINETY_DAYS = 60 * 60 * 24 * 90;
const url = new URL(window.location.href);
for (const name of PARAMS) {
const value = url.searchParams.get(name);
if (!value) continue;
// Meta expects _fbc in the format fb.1.{timestamp}.{fbclid}
const stored = `fb.1.${Date.now()}.${value}`;
document.cookie = `_fbc=${stored}; Max-Age=${NINETY_DAYS}; Path=/; SameSite=Lax; Secure`;
}
// The 4based API tracking link reads this cookie and stores the click ID with the fan.Event mapping
The table shows how each 4based event maps to Meta, with required and recommended parameters. Required parameters are always sent; recommended parameters are sent when the data is available and consent allows it.
| 4based event | Meta | Required | Recommended |
|---|---|---|---|
| Tracking link click | ViewContent | event_name, event_time, action_source, event_source_url | fbc, fbp, client_user_agent |
| Free follow / signup | Lead | event_name, event_time, event_id, user_data.em | fbc, fbp, client_ip_address |
| New subscription | Subscribe | event_id, value, currency, user_data | predicted_ltv, content_ids |
| Renewal | Purchase | event_id, value, currency | content_type: subscription |
| PPV message purchase | Purchase | event_id, value, currency | content_type: ppv, content_ids |
| Tip | Purchase | event_id, value, currency | content_type: tip |
Full payload example
You call one 4based API endpoint (POST https://api.4basedapi.com/v1/ads/meta/events). 4based API translates it into the Meta request (POST https://graph.facebook.com/v19.0/{PIXEL_ID}/events). The examples below send a purchase event in cURL, TypeScript and Python.
curl -X POST https://api.4basedapi.com/v1/ads/meta/events \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"pixel_id": "1234567890",
"test_event_code": "TEST12345",
"event": {
"event_name": "Purchase",
"event_time": 1717000000,
"event_id": "4based_ppv_msg5531",
"action_source": "website",
"event_source_url": "https://link.example.com/summer",
"user_data": {
"em": ["<sha256(email)>"],
"client_ip_address": "203.0.113.7",
"client_user_agent": "Mozilla/5.0 ...",
"fbc": "fb.1.1717000000000.IwAR2abc",
"fbp": "fb.1.1716999000000.987654321"
},
"custom_data": { "currency": "USD", "value": 14.99, "content_type": "ppv" }
}
}'How are fbc and fbp built for 4based traffic?
When a fan taps a Meta ad, Meta appends fbclid to your tracking-link URL. The landing script turns it into the _fbc value using the format fb.1.{timestamp}.{fbclid}, where the timestamp is the click time in milliseconds. If the browser Pixel is present it also sets _fbp, a browser identifier in the format fb.1.{timestamp}.{random}. 4based API stores both values with the fan record so they are available when the conversion happens hours or days later on 4based.
Every server event sends fbc and fbp in user_data together with client_ip_address and client_user_agent from the original click. These four fields, plus the hashed email when the fan has consented, are what lift Event Match Quality from the low range into the good range in Events Manager.
Which endpoint does 4based API call for you?
Under the hood 4based API calls POST https://graph.facebook.com/v19.0/{PIXEL_ID}/events with your system-user access token. You never handle that call yourself: you send one normalized request to POST https://api.4basedapi.com/v1/ads/meta/events, and 4based API adds action_source: "website", the event_source_url of your tracking link, the click context and the correct API version.
Because Meta limits how many conversion events are prioritized for iOS users under Aggregated Event Measurement, rank Subscribe and Purchase at the top of your web event configuration. Lead and ViewContent remain useful for optimization on Android and desktop but should sit lower in the priority list.
Deduplication
If you run the Meta browser pixel alongside server events, both will report the same conversion. To avoid double counting, both must carry the same identifier: event_id together with event_name.
4based API generates the event_id from the 4based transaction, for example 4based_sub_abc123 for a subscription or 4based_ppv_msg5531 for a PPV purchase. If you fire the browser event yourself, read the same value from the tracking-link data layer and pass it to the browser call.
Meta keeps the first event it receives and discards later duplicates within its deduplication window. Server events usually arrive first, so the browser event mainly adds extra signal.
Matching and privacy
Emails are trimmed, lowercased and hashed with SHA-256 before they leave 4based API. Phone numbers are normalized to E.164 and hashed the same way. Raw personal data is never sent to any ad platform.
Fields sent to Meta: hashed email when available, fbclid, _fbc when present, client IP address and user agent from the click, event_id, value and currency. Nothing else is sent.
Consent is respected end to end. 4based API reads IAB TCF v2.2 strings and Google Consent Mode v2 signals recorded on the tracking link. Without advertising consent, hashed identifiers are withheld, and in consent regions the event is blocked entirely. Hashing is not anonymization, so treat hashed identifiers as personal data.
Test and verify
Open Events Manager > Test events. Copy the test code and paste it into the Meta connection in the 4based API dashboard, then click Send test event.
A good result shows the event within a minute with the correct event name, value and currency, plus at least the click ID and one more identifier. Remove the test code once you are done, otherwise live events may be routed to the test view.
After going live, compare conversions in Meta with the 4based API dashboard for the same day. Differences under 5 percent are normal because of attribution windows and time zones.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| No events in test view | Test code missing or expired | Generate a new test code and paste it again |
| Events arrive without fbclid | Query parameters stripped by a redirect | Use the tracking link directly as the ad destination |
| Conversions counted twice | Browser and server events use different IDs | Pass the same event_id to the browser call |
| Invalid token error | Token revoked or for another account | Generate a new token and reconnect |
| Low match quality | Missing IP, user agent or email | Enable click context capture and hashed email with consent |
| Wrong currency or value | Creator currency not set | Set the default currency per creator in the dashboard |
| Events blocked | No advertising consent recorded | Check the consent banner on your landing page |