← View All Guides
Google Analytics logo
Integration Guide

How to Set Up Referral Goals in Google Analytics with GrowSurf

Configure GA4 conversion events and goals to measure your GrowSurf referral program's effectiveness.

Goals (now called conversions in GA4) are how you measure success in Google Analytics. Without properly configured referral goals, you're flying blind β€” you can see referral traffic, but you can't measure whether that traffic is actually converting. Setting up referral-specific goals gives you the data to calculate referral ROI, optimize your referral funnel, and prove program value.

This guide walks you through creating GA4 conversion events specifically for your GrowSurf referral program. You'll set up goals for referral sign-ups, referral link shares, and referral purchases, then build conversion rate reports that compare referral performance against other channels.

Integration Steps

Step 1: Define Your Referral Conversion Events

Plan which user actions in your referral program should be tracked as conversions in GA4.

  • Primary conversions (mark as GA4 Key Events):
    • referral_program_signup β€” when a visitor joins the referral program
    • referral_purchase β€” when a referred visitor makes a purchase
  • Secondary conversions (track but don't mark as Key Events):
    • referral_link_click β€” when someone clicks a referral link
    • referral_share β€” when a participant shares their referral link
    • referral_page_view β€” when someone views the referral landing page
  • Document each event's parameters and when it should fire

Step 2: Implement Conversion Event Tracking

Add GA4 event tracking code that fires at each conversion point in the referral journey.

  • On the referral landing page: track referral_page_view on load
  • On the referral sign-up form: track referral_program_signup on submission
  • On the share button: track referral_share with the share method (email, social, copy)
  • On the purchase confirmation page: track referral_purchase with revenue value
  • Use GrowSurf's JavaScript SDK callbacks to trigger events at the right moments

Step 3: Mark Key Events as Conversions in GA4

Configure GA4 to treat your referral events as conversions for reporting.

  • Go to Admin > Events in GA4
  • Find your custom events in the event list (they appear after first firing)
  • Toggle "Mark as key event" for referral_program_signup and referral_purchase
  • Key events appear in conversion reports and are used for Google Ads optimization

Step 4: Add Monetary Values to Referral Conversions

Assign values to referral conversion events so GA4 can calculate revenue impact.

  • For referral_purchase: pass the actual purchase value using the value and currency parameters
  • For referral_program_signup: assign an estimated value based on average referral LTV
  • For referral_share: assign a small value representing the expected downstream conversion value
  • These values enable ROI calculations and Google Ads Smart Bidding optimization

Step 5: Build a Referral Conversion Funnel

Create a funnel report in GA4 Explore that shows the referral conversion journey.

  • Go to Explore > Funnel Exploration
  • Define funnel steps:
    • Step 1: referral_link_click (referred visitor arrives)
    • Step 2: referral_page_view (views referral landing page)
    • Step 3: referral_program_signup (joins the program)
    • Step 4: referral_purchase (makes a purchase)
  • Analyze drop-off rates between each step to identify optimization opportunities

Step 6: Compare Referral Conversions to Other Channels

Build a comparison report showing how referral conversions stack up against other traffic sources.

  • Go to Acquisition > Traffic Acquisition
  • Select your referral conversion events as the conversion metric
  • Compare channels: Referral (growsurf) vs. Organic Search vs. Paid Search vs. Social
  • Analyze: conversion rate, cost per conversion, and revenue per session by channel
  • Export to Looker Studio for more detailed visualization

Code Snippets

// GA4 Referral Conversion Event Tracking
// Add these to your website alongside GrowSurf's JS SDK

// Track referral link click (on landing page with ?grsf= parameter)
if (window.location.search.includes('grsf=')) {
  gtag('event', 'referral_link_click', {
    referral_source: 'growsurf',
    referral_code: new URLSearchParams(window.location.search).get('grsf')
  });
}

// Track referral program signup
// Call this when GrowSurf's participant creation is confirmed
window.grsfReady = function(grsf) {
  grsf.addListener('participant_created', function(participant) {
    gtag('event', 'referral_program_signup', {
      referral_code: participant.referralCode,
      referred_by: participant.referredBy || 'direct',
      value: 25.00, // Estimated value of a program sign-up
      currency: 'USD'
    });
  });
};

// Track referral purchase with revenue
function trackReferralPurchase(orderData, referralCode) {
  gtag('event', 'referral_purchase', {
    transaction_id: orderData.orderId,
    value: orderData.total,
    currency: 'USD',
    referral_code: referralCode,
    items: orderData.items
  });
}

// Track referral share actions
document.querySelectorAll('[data-share-method]').forEach(btn => {
  btn.addEventListener('click', function() {
    gtag('event', 'referral_share', {
      method: this.dataset.shareMethod, // email, twitter, facebook, copy
      referral_code: currentParticipant.referralCode
    });
  });
});

Tips

Assign Realistic Monetary Values to Non-Revenue Events

Even non-purchase events have value. If 10% of referral sign-ups eventually purchase at $100 average, a sign-up is worth $10. Assign this value to your sign-up conversion event so GA4's revenue reports include estimated referral program contribution. Update these values quarterly based on actual data.

Use Enhanced Ecommerce for Detailed Referral Revenue Tracking

If you're running an e-commerce site, implement GA4's enhanced ecommerce events (add_to_cart, begin_checkout, purchase) alongside your referral tracking. This gives you product-level insights into what referred customers buy compared to direct customers.

Set Up GA4 Audiences Based on Referral Conversions

Create GA4 audiences from users who triggered referral conversions. These audiences can be used in Google Ads for lookalike targeting β€” finding more users who look like your best referral participants and referred customers.

FAQ

What's the difference between GA4 events and conversions?

In GA4, everything is an event. A conversion is simply an event that you've marked as a "Key Event" in your GA4 settings. All key events are tracked in conversion reports and can be used for Google Ads optimization. You can mark up to 30 events as key events per property.

Can I track the entire referral journey from link click to purchase in GA4?

Yes, if you implement events at each step. The referral link click, page view, sign-up, and purchase events can be connected through GA4's user-level tracking. Use Funnel Exploration in GA4 to visualize the complete journey and identify drop-off points.

How do I handle referral conversions that happen across multiple sessions?

GA4 tracks users across sessions by default using cookies and User-ID. If a user clicks a referral link in session 1 but purchases in session 2, GA4's data-driven attribution model credits the referral appropriately. Ensure your User-ID implementation is set up for the most accurate cross-session tracking.

Set up your refer a friend program with customer referral and affiliate program software that lowers your acquisition costs, increases customer loyalty, and saves you gobs of time.

Trusted by marketing and product teams at fast-growing B2C, fintech, and SaaS companies