# Sharer-ID URL encoding for viral factor A/B testing > Encode the sharing user's ID into every shared URL so you can calculate viral factor as a cohort-to-cohort ratio and A/B test product changes to increase it. - Canonical HTML: https://growth.iangoh.com/growth-ideas/sharer-id-url-encoding-for-viral-factor-ab-testing/ - Source: [speedrun.substack.com](https://speedrun.substack.com/p/the-lost-art-of-designing-viral-loops) - GrowthDex source hub: [speedrun.substack.com](/sources/speedrun-substack-com-speedrun-substack-com/) - Last checked: March 23, 2026 - Rarity: common - Budget: free - Channels: Referrals - Stages: 0-100, 100-1K ## Why this can grow Most teams treat sharing and referrals as fire-and-forget features. By encoding user IDs into every shared link and tracking which signups came from which sharers, you turn virality into a measurable, optimizable metric. A/B tests on share prompts, invite timing, and link presentation compound over time. The approach also reveals when a viral loop is saturating (generation-over-generation ratio declining), so you can switch channels before growth stalls. ## Ian's take From scaling consumer platforms across MENA and Southeast Asia, my default is to distrust growth work that only looks good in a slide. The best referral loops I have seen do not feel like campaigns. They feel like the next natural thing after someone gets value. I would look for the exact moment a user feels smart, helped, or ahead, then ask for the share there. I would run it small enough to learn quickly, then only scale the parts that real users repeat, save, reply to, or buy from. For this tactic, I would watch one clear growth signal before putting more time or budget behind it. ## Action plan 1. Define one narrow startup segment where sharer-id url encoding for viral factor a/b testing can create a measurable lift. 2. Turn the tactic into one offer, page, campaign, or workflow for the Referrals channel. 3. Use the evidence from speedrun.substack.com to set the first version of the message, format, and audience. 4. Launch a small test for 7 to 14 days with one success metric: one measurable growth signal. 5. Review the result, keep the winning message, remove weak variants, and turn the learning into a repeatable growth playbook. ## Source-backed example Andrew Chen (a16z, Nov 2025) documents the specific engineering pattern used by Instagram, Facebook, LinkedIn, and modern genAI apps like Sora — by storing sharer_id alongside every new signup row, teams calculated viral factor (e.g., 50 downstream signups from 100 sharers = 0.5) and ran A/B tests on invite flows, share buttons, and onboarding to push the ratio toward 1.0+. Chen notes that products with viral factor above 0.5 meaningfully amplify all other acquisition channels, and that tracking generation-over-generation decay is critical to avoid saturation. ## Adjacent tactics in the same lane - [Two-sided referral reward](/growth-ideas/two-sided-referral-reward/) - 1 shared channel, 2 shared stages - ["Powered by" badge viral loop](/growth-ideas/powered-by-badge-viral-loop/) - 1 shared channel, 2 shared stages - [Collaboration-gated feature expansion](/growth-ideas/collaboration-gated-feature-expansion/) - 1 shared channel, 2 shared stages - [Distribution-first product design](/growth-ideas/distribution-first-product-design/) - 1 shared channel, 2 shared stages ## Read GrowthDex essays Browse the plain-English essay index at [GrowthDex Blog](/blog/). ## Advisory If you want help turning this into a working growth system, Ian Goh offers advisory at https://iangoh.com/advisory.