Built for startups,
scaled for unicorns
Successfully submitted!
Error! Please try again
Amplitude helps product teams understand how users behave β and understanding how referred users behave differently from organic users is one of the most valuable insights for your growth strategy. By sending GrowSurf referral events to Amplitude, you can analyze the complete referred user journey, compare feature adoption between acquisition channels, and measure how your referral program affects product engagement.
This guide covers integrating GrowSurf referral events with Amplitude's analytics platform, setting up user properties for referral segmentation, and building analytics charts that reveal actionable insights about your referral program's impact on product usage.
Configure the data pipeline that sends referral events from GrowSurf to Amplitude.
PARTICIPANT_CREATED β "Referral Program Joined"PARTICIPANT_REFERRED β "Referral Made"CAMPAIGN_REFERRAL_CONVERTED β "Referral Converted"user_id for consistent identitySet user properties in Amplitude that enable referral-based segmentation across all your analytics.
acquisition_channel β "referral" or "organic"referred_by β referrer emailreferral_code β participant's unique codetotal_referrals β number of referrals madereferral_tier β new, active, power, champion$setOnce for acquisition properties that shouldn't change$set for dynamic properties like total_referrals that updateCreate Amplitude charts that visualize referral program activity and trends.
referral_tier to see which tier of referrers is most activeUse Amplitude's segmentation to compare how referred users engage with your product differently.
acquisition_channel = "referral"Use Amplitude Experiment to test referral program variations with product analytics tracking.
Configure Amplitude to notify you of significant changes in referral metrics.
// Send GrowSurf events to Amplitude HTTP V2 API
const axios = require('axios');
const AMPLITUDE_API_KEY = process.env.AMPLITUDE_API_KEY;
async function trackAmplitudeEvent(userId, eventType, eventProperties, userProperties) {
await axios.post('https://api2.amplitude.com/2/httpapi', {
api_key: AMPLITUDE_API_KEY,
events: [{
user_id: userId,
event_type: eventType,
event_properties: eventProperties,
user_properties: {
$set: userProperties.set || {},
$setOnce: userProperties.setOnce || {}
},
time: Date.now()
}]
});
}
app.post('/api/growsurf-to-amplitude', async (req, res) => {
const { event, participant, referrer } = req.body;
const isReferred = !!referrer;
switch (event) {
case 'PARTICIPANT_CREATED':
await trackAmplitudeEvent(
participant.email,
'Referral Program Joined',
{
referral_code: participant.referralCode,
campaign_id: participant.campaignId,
is_referred: isReferred
},
{
setOnce: {
acquisition_channel: isReferred ? 'referral' : 'organic',
referred_by: referrer?.email || null,
referral_signup_date: new Date().toISOString()
},
set: {
referral_code: participant.referralCode,
referral_participant: true
}
}
);
break;
case 'PARTICIPANT_REFERRED':
// Track for the referrer
await trackAmplitudeEvent(
referrer.email,
'Referral Made',
{
referred_email: participant.email,
referral_number: referrer.referralCount
},
{
set: {
total_referrals: referrer.referralCount,
referral_tier: getReferralTier(referrer.referralCount)
}
}
);
break;
}
res.json({ success: true });
});Always use Amplitude's $setOnce operator for acquisition_channel and referred_by properties. This ensures the original acquisition source is preserved even if the user later participates in the referral program as a referrer. Overwriting acquisition data corrupts your cohort analysis.
The real power of Amplitude + GrowSurf isn't just tracking referral events β it's analyzing referral events alongside product usage events. You can answer questions like: "Do users who make referrals also use more features?" and "Does being referred correlate with faster onboarding?"
Create behavioral cohorts in Amplitude based on referral activity, then sync these cohorts to your marketing tools (via Amplitude's integrations) for targeted campaigns. For example, sync a "Power Referrers" cohort to your email tool for VIP messaging.
You can use client-side tracking for some events (like referral link clicks and share button clicks), but server-side tracking via webhooks is more reliable for conversion events. The best approach is both: client-side for user interaction events and server-side (from GrowSurf webhooks) for business events like referral conversions.
Use Amplitude's user_id and device_id for identity resolution. Track anonymous referral link clicks with a device_id. When the user signs up, send an identify event that maps the device_id to their user_id. Amplitude automatically merges the event histories, giving you the full journey from link click to sign-up.
Use Amplitude Experiment to run controlled experiments. Create two variants of your referral program (e.g., different reward amounts) and assign users to variants. Track all referral events with the variant as an event property. Amplitude's statistical engine determines which variant performs better across all your product metrics, not just referral metrics.
Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies
