Ads tracking
Operational+34% avg ROAS visibility
LoyalFans to TikTok Events API
Server-side conversion tracking for every LoyalFans subscription, Video Store clip, Audio Store track, Go Live tip and One on One call.
Architecture
Browser click (ttclid) -> loyalfansapi.com tracking link (stores ttclid, IP, UA) -> LoyalFans checkout (subscription, store, tip, call) -> LoyalFans API webhook engine (net = gross * 0.80, event_id) -> TikTok Events API
Parameter capture matrix
| Parameter | Source | Required |
|---|---|---|
| ttclid | Landing URL query | Yes |
| _ttp | TikTok Pixel cookie | Recommended |
| ip | Tracking link request | Yes |
| user_agent | Tracking link request | Yes |
Event mapping
| LoyalFans event | TikTok event |
|---|---|
| New subscription | Subscribe |
| Store purchase, tip or call | CompletePayment |
Net value calculation
Conversion Value = Gross Amount * 0.80
Reflects the LoyalFans 80/20 creator payout so ROAS matches what the creator actually earns. A $50 purchase reports $40.
Deduplication strategy
event_id = hash(order_id + event_name)
Deterministic IDs (UUIDv5) mean retries and browser + server double-fires are counted once.
Code examples
curl -X POST https://api.loyalfansapi.com/v1/ads/tiktok/events \
-H "Authorization: Bearer sk_live_..." \
-d '{"event":"CompletePayment","order_id":"ord_9912","gross":50.00,"ttclid":"E.C.P.v3..."}'Testing checklist
Open the TikTok Events Manager Test Events tab, paste the test_event_code into your LoyalFans API project and fire a sandbox purchase.
Troubleshooting
| Issue | Fix |
|---|---|
| Events rejected for missing match keys | Pass ttclid or hashed email. LoyalFans API hashes PII with SHA-256 before dispatch. |
| Duplicate conversions | Reuse the same event_id in the TikTok Pixel and the Events API call. |
Ship your first LoyalFans integration today.
Free trial, sandbox keys in minutes, no credit card. Questions? hello@loyalfansapi.com
Start for free