Can I implement GrowSurf if my checkout happens on a third party service?
It is 100% possible to implement GrowSurf when you use a third-party billing service in your checkout flow.
Let's say you have an online store, where your goal is to have your customers share their unique referral link with their friends so that you get more sales through referrals.
For example, you may have a Shopify store and you use ReCharge to handle your billing/payments (i.e, your user is navigated away from your main website during the checkout process to a third-party processor in order to complete their purchase).
If you want the referral to be triggered on a thank-you page:
- When a referred friend lands on your webpage, the referrer ID will be automatically saved as a cookie.
- Once the user has completed checkout on your third-party service, redirect them back to your main site on a "thank-you" page. Make sure you have the new customer's email address, and on the "thank-you" page, call growsurf.triggerReferral(). Because the referrer ID is saved as a cookie, their referrer will automatically be associated with the new customer.
If you want the referral to be triggered at the checkout:
- When a referred friend lands on your webpage, the referrer ID will be automatically saved as a cookie.
- Call the JavaScript method growsurf.getReferrerId() and store the referrer's ID. This is necessary because your main site and third-party billing service do not share the same origin, and thus you must pass the referrer ID somehow.
- When the user clicks to be taken to the checkout site, make sure to pass the new customer's email address and their referrer ID as URL parameters.
- Once you have the user's (1) email address, and (2) the referrer ID, you can then call the REST API endpoint /POST Add Participant to trigger the referral on the checkout process.