← View All Guides
Google Analytics logo
Integration Guide

How to Attribute Conversions to Referrals in Google Analytics with GrowSurf

Use GA4 attribution models to understand how your GrowSurf referral program contributes to conversions.

Attribution answers the question: which marketing touchpoints actually drove the conversion? When a customer interacts with your referral program and other marketing channels before purchasing, GA4's attribution models determine how much credit the referral gets. Understanding referral attribution helps you invest your marketing budget wisely.

This guide covers configuring GA4's attribution settings for accurate referral tracking, comparing attribution models to see how referral credit changes, and building attribution reports that show the true contribution of your GrowSurf referral program alongside other channels.

Integration Steps

Step 1: Understand GA4's Attribution Models

Learn how GA4 attributes conversions across multiple touchpoints and what this means for referral tracking.

  • GA4 uses data-driven attribution by default β€” it uses machine learning to assign credit based on your actual data
  • Other available models:
    • Last click: 100% credit to the last channel before conversion
    • First click: 100% credit to the first channel (often the referral link)
    • Linear: Equal credit to all touchpoints
    • Position-based: 40% first, 40% last, 20% split among middle
  • Referral programs typically perform well under first-click and position-based models

Step 2: Configure Attribution Settings for Referral Accuracy

Adjust GA4's attribution configuration to properly credit referral touchpoints.

  • Go to Admin > Attribution Settings
  • Set the attribution lookback window to match your referral program's typical conversion timeline
  • For SaaS: 30-day window (most referral conversions happen within 2 weeks)
  • For e-commerce: 7-14 day window (referral purchases are typically faster)
  • Choose your reporting attribution model (data-driven recommended for accuracy)

Step 3: Build Model Comparison Reports

Compare how different attribution models credit your referral channel to understand its true impact.

  • Go to Advertising > Attribution > Model Comparison
  • Compare data-driven vs. last-click for the "growsurf" source
  • If referrals get more credit under first-click than last-click, it means referrals are strong at initiating the journey but other channels close the deal
  • Use this insight to determine whether referrals are best at top-of-funnel (awareness) or bottom-of-funnel (conversion)

Step 4: Create Attribution Path Analysis for Referrals

Examine the typical conversion paths that include referral touchpoints.

  • Go to Advertising > Attribution > Conversion Paths
  • Filter to paths that include the "growsurf / referral" source/medium
  • Analyze common path patterns:
    • Referral β†’ Direct β†’ Conversion (referral initiated, user returned directly)
    • Referral β†’ Organic Search β†’ Conversion (referral introduced, user researched)
    • Organic β†’ Referral β†’ Conversion (user was aware, referral convinced)
  • Understanding these paths reveals the role referrals play in your overall conversion journey

Step 5: Measure Referral-Assisted Conversions

Track how often referrals assist conversions even when they're not the last touchpoint.

  • In the Model Comparison report, look at the difference between first-click and last-click attribution for referrals
  • A large difference means referrals assist many conversions without getting last-click credit
  • Calculate the assist-to-conversion ratio for referrals compared to other channels
  • Referrals with high assist ratios are undervalued in last-click reporting

Step 6: Report Referral Attribution to Stakeholders

Build clear, executive-friendly reports that show referral program attribution impact.

  • Create a Looker Studio dashboard connected to GA4 showing:
    • Referral channel credit under data-driven attribution (conversions and revenue)
    • Referral vs. other channels comparison chart
    • Month-over-month referral attribution trends
    • Referral assist conversion count
  • Include a brief explanation of the attribution model used
  • Highlight insights: "Referrals initiated X% of all conversion paths this month"

Code Snippets

// GA4 Attribution Analysis via Data API
// Use the Google Analytics Data API to pull attribution data programmatically

const { BetaAnalyticsDataClient } = require('@google-analytics/data');
const analyticsDataClient = new BetaAnalyticsDataClient();

async function getReferralAttribution(propertyId) {
  const [response] = await analyticsDataClient.runReport({
    property: `properties/${propertyId}`,
    dateRanges: [{ startDate: '30daysAgo', endDate: 'today' }],
    dimensions: [
      { name: 'sessionSource' },
      { name: 'sessionMedium' }
    ],
    metrics: [
      { name: 'conversions' },
      { name: 'totalRevenue' },
      { name: 'sessions' }
    ],
    dimensionFilter: {
      filter: {
        fieldName: 'sessionSource',
        stringFilter: { value: 'growsurf' }
      }
    }
  });

  const referralData = response.rows.map(row => ({
    source: row.dimensionValues[0].value,
    medium: row.dimensionValues[1].value,
    conversions: row.metricValues[0].value,
    revenue: row.metricValues[1].value,
    sessions: row.metricValues[2].value,
    conversionRate: (row.metricValues[0].value / row.metricValues[2].value * 100).toFixed(2)
  }));

  return referralData;
}

// Example output:
// { source: 'growsurf', medium: 'referral',
//   conversions: '145', revenue: '14500',
//   sessions: '2300', conversionRate: '6.30' }

Tips

Don't Rely on Last-Click Attribution for Referrals

Last-click attribution systematically undervalues referral programs because referrals often initiate the journey but users return directly or via search to convert. Always use data-driven or position-based attribution to see the full referral contribution.

Track Both Direct and Assisted Conversions

Report both metrics: direct referral conversions (where referral was the last touch) AND assisted referral conversions (where referral was part of the path). The sum of both represents the true referral program impact. Assisted conversions are often 2-3x the direct conversions for referral programs.

Align Attribution Windows with Your Sales Cycle

If your product has a 30-day evaluation period, set your attribution lookback to at least 30 days. Too short a window means referral clicks that lead to conversions after the window expires get zero credit, undervaluing your program.

FAQ

Why does my referral channel show different conversion numbers in different GA4 reports?

GA4 uses different attribution models in different report sections. The Acquisition reports use last-click by default, while the Advertising section uses data-driven attribution. The same referral channel can show different conversion counts depending on which model is applied. Use the Advertising section for the most accurate multi-touch attribution view.

How do I handle referral attribution when cookies are blocked?

GA4's User-ID feature helps bridge cookie gaps. When a referred user signs up, set their User-ID so GA4 can track them across sessions even without cookies. Additionally, GA4's consent mode and modeling features estimate conversions from users who decline cookies, helping fill attribution gaps.

Can I create a custom attribution model that gives referrals more credit?

GA4 doesn't support fully custom models, but the data-driven model already adapts to your data. If referrals consistently lead to conversions, the data-driven model will naturally give them more credit. For manual analysis with custom weighting, export your attribution data to a spreadsheet or BI tool and apply your own model.

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