Tracking with FirstPromoter tracking scripts
Track clicks and referrals using the fpr.js scripts
Installation
First Add the main tracking scripts to your website.
Replace <your-account-id-here>
with your actual account id found in the settings > integrations page on your FirstPromoter dashboard.
Tracking Flow
1. Click Tracking
The main tracking script automatically tracks visitors that come through your affiliate links:
- When a visitor arrives on your website using a referral link the main tracking script will automatically track the click.
- The click sets 2 cookies in the browser -
_fprom_ref
and_fprom_tid
- These cookies are used for tracking in future without the need for a referral link.
2. Referral Tracking
When a visitor signs up or fills an opt-in form, convert them to a referral by using the signup function:
You can send only the email or only the uid or both. You need to ensure that the actual visitor data is passed to the function.
3. Sales Tracking
If you are using Stripe, Chargebee, Braintree, Paddle or Recurly we can track sales automatically on our end. You will only need to connect your billing provider to FirstPromoter.
If you use any other billing provider you will need to track sales using the tracking API.
When a sale event is received, FirstPromoter will automatically:
- Identify the corresponding affiliate to assign the sale to.
- Assign the corresponding reward/commission to the promoter.
With this in place you have completed the basic tracking flow. From tracking of clicks through to assigning the corresponding commissions to the affiliates.