Create your referral program in under 15 minutes with the help of our quickstart guide. Then invite your dev team to complete installation.

Follow your program checklist to test, launch, and promote your referral program. With GrowSurf, you'll get guided every step of the way to ensure you find success with your referral marketing efforts.

Real-time analytics and admin dashboard give you powerful insights like who your top referrers are and the engagement funnel for your referral program, while weekly and monthly email reports keep you in the loop.

Next, tell GrowSurf when a new user signs up through a referral link. Choose one of the options below based on how your signup flow works.
Add one GrowSurf script to your signup page and GrowSurf can connect each signup back to the person who shared the link. It attaches referral tracking to the signup flow and landing pages you already use, so you do not need to change how new users or leads sign up today.
<script type='text/javascript'>
(function(g,r,s,f){g.grsfSettings={campaignId:'45hxmj',version:'2.0.0'};s=r.getElementsByTagName('head')[0];f=r.createElement('script');f.async=1;f.src='https://app.growsurf.com/growsurf.js'+'?v='+g.grsfSettings.version;f.setAttribute('grsf-campaign', g.grsfSettings.campaignId);!g.grsfInit?s.appendChild(f):';})(window,document);
</script>
After the script is installed, referred visitors still use your normal signup flow. The difference is that the page can now show invite details for that visitor, such as who sent them there and the offer tied to the visit. See the before and after example below:
Before AfterIf you use a custom form or single-page app, send the signup to GrowSurf with
growsurf.addParticipant() . Pass the new user's email and GrowSurf can match them to the person who shared the link from the browser cookie.growsurf.addParticipant({
email: 'gavin@hooli.com',
firstName: 'Gavin',
lastName: 'Belson',
// Optional: Save any custom data as participant metadata
country: 'UK',
subscriptionPlan: 'Pro',
});
You can also send extra fields as metadata if you want to use them later in reports or rewards.
If signups happen inside your native iOS or Android app, use the GrowSurf mobile SDK. There are two parts: capture the referral attribution when the new user opens the link, then create the referred participant when they sign up.
1. Capture attribution
Capture referral attribution before you create the referred participant, so the referral survives the journey from link to signup. A referred friend can arrive two ways: by opening your already-installed app (a direct deep link), or by installing the app first and opening it later (a deferred deep link). For deferred links, GrowSurf provides adapters for Branch, Adjust, AppsFlyer, and Singular (see the iOS and Android adapter docs); on Android it can also read the Google Play Install Referrer natively.
Direct deep link
if let url {
try await growsurf.handleDeepLink(url)
}
Deferred deep link (attribution provider)
import GrowSurfBranchAttribution
// Forward your provider's deferred deep link (Branch shown; Adjust, AppsFlyer, and Singular work the same)
try await GrowSurfBranchAttribution.handle(branchParams, sdk: growsurf)
Direct deep link
intent.data?.let { uri ->
growsurf.handleDeepLink(uri)
}
Deferred deep link (attribution provider)
lifecycleScope.launch {
// Native: read the Google Play Install Referrer
growsurf.handleDeferredDeepLink()
// Or forward an attribution provider's data (Branch, Adjust, AppsFlyer, Singular)
GrowSurfBranchAttribution.handle(branchParams, growsurf)
}
2. Create a referred participant
When the new user signs up, call
addReferredParticipant(). The SDK validates the saved attribution and only creates the participant when the referral code is valid.// Only creates a referred participant if the referral code is valid
let created = try await growsurf.addReferredParticipant(
.init(
email: "gavin@hooli.com",
firstName: "Gavin",
lastName: "Belson",
metadata: ["subscriptionPlan": "Pro"] // Optional, saved as participant metadata
)
)
let participant = created.participant
// Only creates a referred participant if the referral code is valid
val created = growsurf.addReferredParticipant(
GrowSurfParticipantInput(
email = "gavin@hooli.com",
firstName = "Gavin",
lastName = "Belson",
metadata = mapOf("subscriptionPlan" to "Pro"), // Optional, saved as participant metadata
)
)
val participant = created.participant
You can also send extra fields as metadata if you want to use them later in reports or rewards.
If your signups happen on your server, send the signup through
/POST Add Participant . Pass the new user's email plus referredBy, which can be the referrer ID or email address, or retrieve it with growsurf.getReferrerId() on the web, pendingAttribution() on iOS, or getPendingAttribution() on Android.curl -X POST 'https://api.growsurf.com/v2/campaign/45hxmj/participant' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d $'{
"email": "gavin@hooli.com",
"firstName": "Gavin",
"lastName": "Belson",
"referredBy": "richard-h8kp6l",
# Optional: Save custom fields as participant metadata
"metadata": {
"country": "UK",
"subscriptionPlan": "Pro"
}
}'
You can also send extra fields as metadata if you want to use them later in reports or rewards.
Then tell GrowSurf what counts as a successful referral. Choose one of the options below based on where that success event happens.
Connect a billing, CRM, or automation tool and GrowSurf can mark successful referrals for you.
Mark referrals as successful after another event (view Zap templates)
If the success event happens on your server, call
/POST Trigger Referral by Email when the referred user completes it. Just provide the email address of the person who completed the referral goal.curl -X POST 'https://api.growsurf.com/v2/campaign/45hxmj/participant/gavin@hooli.com/ref' \
-H 'Authorization: Bearer YOUR_API_KEY'
Finally, send the reward. GrowSurf emails people when they earn the reward, and you can choose one of the options below based on how you want the reward to go out.
Connect a reward tool or automation and GrowSurf can send rewards for you.
Send other rewards with Zapier
You can also offer different reward amounts based on who was referred or what they bought. See how to set that up with flexible reward rules.
If you want full control, use webhooks and send the reward from your own system. You can also pass reward metadata so your team can change reward values without changing code each time.
// Node.js webhook example
app.post('/your/webhook/payload-url', function(req, res) {
const body = req.body;
try {
if (body.event === 'PARTICIPANT_REACHED_A_GOAL') {
// Write code here to do something when a participant wins a reward
console.log(`${body.data.participant.email} just won this reward: ${body.data.reward.description}`);
// If the reward is approved
if (body.data && body.data.reward && body.data.reward.approved) {
// Do something
// Optional: If there is any reward metadata, use it:
if (body.data.reward.metadata && body.data.reward.metadata["proRewardValue"]) {
console.log(`${body.data.participant.email} earned an amount of ${body.data.reward.metadata["proRewardValue"]}.`);
}
}
// If this is a double-sided reward, use body.data.reward.isReferrer to determine if this is for the referrer or referred person
if (body.data && body.data.reward && body.data.reward.isReferrer) {
// Do something
}
}
} catch (err) {
res.status(400).end();
}
res.json({received: true});
});
First, give each user a place to get their referral link, share it, and see how their referrals are doing. Here are three simple ways to do that.
If you do not want to build this page yourself, use the hosted page that comes with your program. You can also put it on your own subdomain, such as https://refer.yoursite.com.

Use a popup if you want a simple way to show each user's referral link, referrals, and rewards inside your product / web app. Open it from any button in your UI and pass the logged-in user's email so GrowSurf knows whose details to show.
Example button code:
<a class="growsurf-window-open"
data-grsf-email="gavin@hooli.com"
data-grsf-first-name="Gavin"
data-grsf-last-name="Belson">
Refer and Earn $100
</a>
If you want the referral experience on your own page, embed the pieces you need directly in your product / web app. When a user is logged in, their link and referral activity can load automatically.
Referral Link - Show each user's referral link

Example embed code:
<div data-grsf-block-form
data-grsf-email="gavin@hooli.com"
data-grsf-first-name="Gavin"
data-grsf-last-name="Belson"
></div>
Invite Form - Let users send email invites from this page

Example embed code:
<div data-grsf-block-invite></div>Referral Status - Show each user's referral progress

Example embed code:
<div data-grsf-block-referral-status></div>You can style these embedded blocks to match your product. See our docs for setup details.
Have a native iOS or Android app? Use the GrowSurf mobile SDK to show each user's referral link, referrals, and rewards in a native window. Open it from any button in your app with
presentGrowSurfWindow() and pass a participant token so GrowSurf knows whose details to show.
iOS

Android
Example code:
growsurf.presentGrowSurfWindow(
from: viewController,
identity: .existingParticipantToken(participantToken)
)
growsurf.presentGrowSurfWindow(
activity = this,
identity = GrowSurfWindowIdentity.ExistingParticipantToken(participantToken)
)
Connect your email tool to add referral links to the emails you already send.
Add referral links to email campaigns and transactional emails

Chargebee
Webhooks

