Links

Getting Started for Native Mobile

For native iOS and Android app integration, start here once you've created your GrowSurf campaign.
In order to integrate a referral program into your native iOS or Android application, there are three flows to consider (you can mix and match any of these with Web implementations):
  1. 1.
    Referral tracking - knowing when someone who downloads your app came through a referral link
  2. 2.
    Referral trigger - knowing when the referred friend performs a qualifying action, which unlocks rewards
  3. 3.
    Referral portal - giving your logged-in users a way to share their referral link and check the status of their referrals

Referral tracking

Let's say you want to track which users that downloaded your app came through a referral link.
You have two options for referral tracking on mobile.
This option makes sense if you want to quickly integrate referral tracking, but the user experience may be compromised.
Here's what the flow looks like:
  1. 1.
    Someone visits a participant's unique referral link on their mobile device (e.g, https://yoursite.com?grsf=abc123).
    1. 1.
      This webpage should have a form to capture the referred friend's email address.
  2. 2.
    Once submitted, the form redirects the referred friend to the Apple App Store or Google Play Store in order to allow them to install the app.
  3. 3.
    The referred friend installs the app.
Instructions:
There are no special requirements to achieve this flow. You can follow Getting Started for Web.
This option makes sense if you want to have a seamless native referral tracking integration, but more development effort is required. You will need to use deferred deeplinking in conjunction with the GrowSurf REST API.
Here's what the flow looks like:
  1. 1.
    Someone visits a participant's unique referral link on their mobile device (e.g, https://yoursite.com?grsf=abc123).
    • This URL should be using deferred deeplinking (this is necessary to pass the grsf URL parameter to Step #3).
    • This URL should contain JavaScript that detects what mobile device the user is on, and automatically redirects the user to the Apple App Store or Google Play Store in order to allow them to install the app.
  2. 2.
    The referred friend installs the app.
  3. 3.
    They open up the app and sign up (this is where you call the GrowSurf REST API endpoint /Add New Participant By Email and pass in the grsf URL parameter from Step #1 as the referredBy value).
    • If you are unable to implement deferred deeplinking, you can provide an input field at signup to allow the user to enter their referrer's ID or email.
    • As a pro tip, GrowSurf participants support metadata, so you can include any custom data that you'd like when adding the new referred participant. This is useful if you want to issue dynamic rewards.)
Instructions:
In order to achieve this flow, you will need to use deferred deeplinking (for more information on this topic, check out Adjust's in-depth blog post here). As there is no industry standard for deferred deeplinking, Adjust and Branch are some out-of-the-box solutions.
You can also skip step #1 when following your campaign's installation page instructions (in other words, no need to install the GrowSurf Universal Code on your Share URL).

Referral trigger

To unlock rewards, your referred mobile users will need to complete a qualifying action that triggers a referral.
On the server-side, you'll need to call the GrowSurf REST API endpoint /POST Trigger Referral by Participant Email.
This endpoint only requires the referred logged-in user's email address at a minimum (this person will already exist as a referred GrowSurf participant in your campaign from the referral tracking step above).

Referral portal

For the use-case of providing your mobile app users with their referral links and ability to see the status of their referrals, you would use the GrowSurf REST API to retrieve data and display on the client-side.
These are the most common endpoints used by GrowSurf customers: