Track Referral Activity Via The Api
The Referral Partner component is integrated with Infusionsoft web forms, order forms, and shopping cart. If these Infusionsoft features are used, the referrals are tracked automatically based on clicks on the referral tracking link, opt-in s, and purchases. If this is true, the information in this article isn't needed.
If the Infusionsoft API is used to integrate with an outside lead capture (e.g. a quoting system) or order system (e.g. a custom shopping cart), then referral tracking must be implement through the following modifications:
Standard Referral Tracking Link Modification
Infusionsoft has a built-in referral tracking link that will
- Read the referral cookie
- Send the person to the destination URL
- and add the referring partner's ID number as a parameter in the URL
If the API is being used with with lead capture forms or orders, use this modified link format to create referral tracking links in Infusionsoft (CRM > Referral Partners > Referral Tracking Links). Instead of entering the simple URL for the destination website (e.g. http://www.example.com), enter the modified redirect (e.g. https://appName.infusionsoft.com/aff.html?to=http://www.example.com.)
Here is an example of the modified redirect link URL:
If the prospect clicking on this link has a referral cookie stored on their browser, the partner will land on a page with a URL something like this:
The destination URL matches the one at the end of the redirect link and the referring partner's ID is part of the URL. If no cookie is found, the referral partner ID number is set to zero.Important Note!
Code will need to be written that will pull the referral partner id from the url.URL parameters aren't able to be used.