Difficulty: IntermediateDeveloper Required: Yes
With the FirstPromoter Tracking API you can track signups, sales, refunds, and cancellations directly from your backend — no JavaScript required.
Available endpoints:
See the Tracking API reference for full parameter documentation including deduplication via
event_id, recurring commission scheduling, and custom fields.
Using sub IDs, postbacks or ad tracking with the API
If you want to use sub IDs, postbacks or ad tracking, sendingref_id to track/signup is not enough. These features rely on data captured when the visitor clicks the referral link: the sub ID (fp_sid) from the link, the landing page URL with any ad click IDs, and the visit itself. FirstPromoter only records that data when the click is tracked by the tracking script, and only links it to the referral when you send the visit’s tid.
To keep this data, use the tracking script for clicks and the API for signups:
1
Install the main tracking script
Add the main tracking script to every page a referral link can land on. When a visitor arrives through a referral link, the script tracks the click and sets the
_fprom_ref and _fprom_tid cookies.If visitors land on one domain and sign up on another, set up cross-domain tracking so the cookies are available where the signup happens.2
Read the _fprom_tid cookie at signup
When the visitor signs up, read the
_fprom_tid cookie on your server (or in the browser and send it to your server with the signup form).3
Send it as tid to track/signup
Pass the cookie value in the
tid parameter of track/signup. FirstPromoter uses it to find the tracked click, credit the right affiliate, and attach the sub ID, landing URL and ad data to the referral.