LoyalFansAPI
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

ParameterSourceRequired
ttclidLanding URL queryYes
_ttpTikTok Pixel cookieRecommended
ipTracking link requestYes
user_agentTracking link requestYes

Event mapping

LoyalFans eventTikTok event
New subscriptionSubscribe
Store purchase, tip or callCompletePayment

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

IssueFix
Events rejected for missing match keysPass ttclid or hashed email. LoyalFans API hashes PII with SHA-256 before dispatch.
Duplicate conversionsReuse 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