Generic referral tracking script
If you wish to track referrals for successful conversions of custom success pages, the
[affiliate_conversion_script] shortcode allows you to track affiliate referral links and generate referrals on successful conversions by placing it on your "success" page.
When a visitor comes to your site via an affiliate link and successfully makes it through your checkout, signup form, or any other conversion process, this short code will generate a referral record for the affiliate whose link was clicked.
[affiliate_conversion_script] should be placed on your success page (the page visitors land on after completing their purchase or signup). The short code accepts several parameters that allow you to define the various values for the referral generated:
- amount The purchase amount that the referral should be based on. This is the total purchase amount, not the total referral amount. The referral amount will be calculated based off of the referral rate for the affiliate.
- description A description logged with the referral.
- context A context for the referral. You will want to use this if you have multiple purchase or signup forms.
- reference A unique reference variable for the affiliate. This could be the user ID of the new user (if they are signing up for your site) or a transaction ID.
- status The status to give the referral. By default, referrals created with this short code will be set to "pending". Valid options are: "pending", "unpaid", "paid", and "rejected".
An example using all of the parameters above:
[affiliate_conversion_script amount="10" description="My Description" context="Contact Form" reference="1234" status="pending"]
Note on formatting: Ensure you leave spaces between the script parameters as seen in the above example, otherwise you will have blank entries, including a zero amount when the referral is created.
Note on usage: The [affiliate_conversion_script] shortcode can be used on multiple success pages, but a referral cannot be generated again until cookies are cleared/expired.