[{"data":1,"prerenderedAt":422},["ShallowReactive",2],{"blog-how-to/track-referral-sources":3},{"id":4,"title":5,"body":6,"category":393,"date":394,"dateModified":394,"description":395,"draft":396,"extension":397,"faq":398,"featured":396,"keywords":407,"meta":408,"navigation":409,"ogDescription":410,"ogTitle":411,"path":412,"readTime":413,"schemaOrg":414,"schemaType":415,"seo":416,"sitemap":417,"stem":418,"tags":419,"twitterCard":420,"__hash__":421},"blog/blog/how-to/track-referral-sources.md","Track Referral Sources on Your Landing Page",{"type":7,"value":8,"toc":384},"minimark",[9,13,16,35,40,43,72,85,88,92,95,105,108,122,126,129,137,140,210,216,222,226,232,238,248,252,259,267,274,277,283,287,290,296,302,311,359],[10,11,12],"p",{},"You launched on Product Hunt last week and collected 200 signups. You sent a tweet, posted in two Indie Hackers threads, and a friend shared your link on LinkedIn. Now you want to know which channel drove real signups vs. which one just added noise. Without referral source tracking, your answer is a guess.",[10,14,15],{},"OperatorStack captures referral sources automatically from the same script tag you use for your waitlist and forms. Here is how it works and how to read the data.",[17,18,19],"tldr",{},[10,20,21,22,26,27,30,31,34],{},"OperatorStack reads ",[23,24,25],"code",{},"?utm_source="," and ",[23,28,29],{},"?ref="," parameters on every pageview. No extra setup. The Analytics tab shows a breakdown of visits and signups by source. For custom tagging, use ",[23,32,33],{},"OperatorStack.trackEvent(\"event_name\", { source: \"channel\" })"," from the SDK.",[36,37,39],"h2",{"id":38},"how-referral-source-tracking-works","How Referral Source Tracking Works",[10,41,42],{},"Two mechanisms run automatically when your script tag loads.",[10,44,45,49,50,53,54,57,58,57,61,57,64,67,68,71],{},[46,47,48],"strong",{},"UTM parameter capture."," When a visitor lands on ",[23,51,52],{},"yoursite.com?utm_source=twitter&utm_campaign=launch",", OperatorStack reads those parameters and stores them with the pageview. Standard UTM fields captured: ",[23,55,56],{},"utm_source",", ",[23,59,60],{},"utm_medium",[23,62,63],{},"utm_campaign",[23,65,66],{},"utm_content",", and ",[23,69,70],{},"utm_term",".",[10,73,74,77,78,81,82,84],{},[46,75,76],{},"Referral code detection."," When someone clicks a sharing link from your waitlist (for example, ",[23,79,80],{},"yoursite.com?ref=abc123","), OperatorStack reads the ",[23,83,29],{}," value and ties it to the referrer's contact record. Any signup from that session gets attributed to the correct person.",[10,86,87],{},"Both run client-side on page load. You do not write any tracking calls for these to work.",[36,89,91],{"id":90},"step-1-add-the-script-tag","Step 1: Add the Script Tag",[10,93,94],{},"If you do not have the OperatorStack script on your page yet, add it:",[96,97,103],"pre",{"className":98,"code":100,"language":101,"meta":102},[99],"language-html","\u003Cscript src=\"https://operatorstack.dev/os.js\" data-project=\"pk_your_key\">\u003C/script>\n","html","",[23,104,100],{"__ignoreMap":102},[10,106,107],{},"That is the only change needed for automatic UTM and referral source tracking. Referral sources start appearing in your dashboard within minutes of your first tagged visit.",[109,110,111],"tip-box",{},[10,112,113,114,117,118,121],{},"Place the script tag in ",[23,115,116],{},"\u003Chead>"," rather than just before ",[23,119,120],{},"\u003C/body>"," so referral data is captured even if the visitor bounces before the page fully loads.",[36,123,125],{"id":124},"step-2-tag-your-campaign-links-with-utm-parameters","Step 2: Tag Your Campaign Links With UTM Parameters",[10,127,128],{},"For any link you share externally, append UTM parameters. Standard format:",[96,130,135],{"className":131,"code":133,"language":134},[132],"language-text","https://yoursite.com?utm_source=twitter&utm_medium=social&utm_campaign=launch\n","text",[23,136,133],{"__ignoreMap":102},[10,138,139],{},"Practical examples by channel:",[141,142,143,156],"table",{},[144,145,146],"thead",{},[147,148,149,153],"tr",{},[150,151,152],"th",{},"Channel",[150,154,155],{},"Example URL",[157,158,159,170,180,190,200],"tbody",{},[147,160,161,165],{},[162,163,164],"td",{},"Twitter/X",[162,166,167],{},[23,168,169],{},"?utm_source=twitter&utm_medium=social",[147,171,172,175],{},[162,173,174],{},"Product Hunt",[162,176,177],{},[23,178,179],{},"?utm_source=producthunt&utm_medium=referral",[147,181,182,185],{},[162,183,184],{},"Indie Hackers",[162,186,187],{},[23,188,189],{},"?utm_source=indiehackers&utm_medium=community",[147,191,192,195],{},[162,193,194],{},"Email newsletter",[162,196,197],{},[23,198,199],{},"?utm_source=newsletter&utm_medium=email",[147,201,202,205],{},[162,203,204],{},"Direct share link",[162,206,207],{},[23,208,209],{},"?utm_source=share&utm_medium=referral",[10,211,212,213,215],{},"You do not need all five UTM fields. ",[23,214,56],{}," alone is enough to distinguish channels in your dashboard.",[217,218,219],"warning-box",{},[10,220,221],{},"Do not tag your own internal links (navigation, footer links, internal CTAs) with UTM parameters. Internal UTM tags overwrite the original source attribution and inflate one channel's numbers at the expense of others.",[36,223,225],{"id":224},"step-3-view-referral-source-data-in-the-dashboard","Step 3: View Referral Source Data in the Dashboard",[10,227,228,229,231],{},"Open your project in OperatorStack and go to the Analytics tab. The Traffic Sources panel shows every ",[23,230,56],{}," value captured, ranked by visit count, with a conversion rate column (signups divided by unique visitors from that source).",[10,233,234,235,237],{},"You will also see a separate Referrals panel for ",[23,236,29],{}," traffic, which maps to your waitlist leaderboard. Each referral code shows the number of visits and conversions it drove.",[10,239,240,241,243,244,247],{},"If a visitor arrives without any UTM or ",[23,242,29],{}," parameter, OperatorStack records them as ",[23,245,246],{},"direct"," traffic.",[36,249,251],{"id":250},"advanced-sdk-event-tracking-with-source-attribution","Advanced: SDK Event Tracking With Source Attribution",[10,253,254,255,258],{},"For custom events beyond pageviews and signups, use ",[23,256,257],{},"trackEvent()"," directly:",[96,260,265],{"className":261,"code":263,"language":264,"meta":102},[262],"language-javascript","// Tag a custom event with the source channel\nawait OperatorStack.ready;\n\nOperatorStack.trackEvent(\"demo_requested\", {\n  source: \"product_hunt\",\n  campaign: \"may_launch\",\n});\n","javascript",[23,266,263],{"__ignoreMap":102},[10,268,269,270,273],{},"This is useful when you are running a specific campaign and want to track a deeper conversion (demo request, trial start, upgrade click) beyond the initial signup. The ",[23,271,272],{},"source"," field appears in the Events section of your Analytics tab.",[10,275,276],{},"You can also read the current page's referral source and pass it programmatically:",[96,278,281],{"className":279,"code":280,"language":264,"meta":102},[262],"await OperatorStack.ready;\n\n// OperatorStack exposes the detected source on the analytics object\nconst detectedSource = OperatorStack.analytics?.source ?? \"direct\";\n\nOperatorStack.trackEvent(\"waitlist_joined\", {\n  source: detectedSource,\n});\n",[23,282,280],{"__ignoreMap":102},[36,284,286],{"id":285},"what-to-do-with-referral-source-data","What to Do With Referral Source Data",[10,288,289],{},"Three actions that move the needle within a week of launch:",[10,291,292,295],{},[46,293,294],{},"Cut the channels that do not convert."," A channel with 500 visits and 2 signups is not worth your time. Referral source data tells you this within days, not months.",[10,297,298,301],{},[46,299,300],{},"Double down on the channel with the highest conversion rate."," Often it is a niche community (an Indie Hackers thread, a specific subreddit, a Discord server) that sends fewer visitors but converts at 8-12% vs. 1-2% for broad social.",[10,303,304,307,308,310],{},[46,305,306],{},"Activate your top referrers."," The Referrals panel shows which ",[23,309,29],{}," links drive the most signups. The people behind those links are your most engaged early users. Reach out before you launch.",[312,313,314,328,337,343,349],"faq-section",{},[315,316,318],"faq-item",{"question":317},"Does OperatorStack automatically capture UTM parameters?",[10,319,320,321,57,323,67,325,327],{},"Yes. Every pageview captured by OperatorStack records ",[23,322,56],{},[23,324,60],{},[23,326,63],{}," when they are present in the URL. No extra configuration.",[315,329,331],{"question":330},"What is the ?ref= parameter used for?",[10,332,333,334,336],{},"The ",[23,335,29],{}," parameter carries a referral code from your waitlist sharing links. OperatorStack reads it on load and attributes the resulting signup to the correct referrer.",[315,338,340],{"question":339},"Can I track referral sources without changing my landing page code?",[10,341,342],{},"Yes. Add the OperatorStack script tag once. Referral source tracking is on by default -- no extra function calls needed for UTM and ref detection.",[315,344,346],{"question":345},"How do I see which source drives the most signups?",[10,347,348],{},"The Analytics tab in your project dashboard shows a traffic source breakdown. Each source lists pageviews and signup conversion rate so you can compare channels directly.",[315,350,352],{"question":351},"Can I add custom source data to an event?",[10,353,354,355,358],{},"Yes. Use ",[23,356,357],{},"OperatorStack.trackEvent('event_name', { source: 'your_source' })"," to attach any source label to a custom event.",[360,361,362,363],"content-related-articles",{},"\n  ",[364,365,362,369],"contentrelatedcard",{"href":366,"title":367,"description":368},"/blog/how-to/analytics-without-cookie-banners","Cookieless Analytics: Add Page Tracking Without a Cookie Banner","Add privacy-friendly page analytics to any landing page. No consent popup, no GDPR headache.",[364,370,362,374],{"href":371,"title":372,"description":373},"/blog/guides/why-referral-tracking","Why Referral Tracking Matters for Pre-Launch Growth","The data case for building referral attribution before you launch, not after.",[364,375,379],{"href":376,"title":377,"description":378},"/blog/how-to/set-up-waitlist","How to Set Up a Waitlist in Under 5 Minutes","From zero to collecting signups with referral tracking. One script tag, no backend.",[380,381],"cta-box",{"href":382,"label":383},"/","Get Started Free",{"title":102,"searchDepth":385,"depth":385,"links":386},2,[387,388,389,390,391,392],{"id":38,"depth":385,"text":39},{"id":90,"depth":385,"text":91},{"id":124,"depth":385,"text":125},{"id":224,"depth":385,"text":225},{"id":250,"depth":385,"text":251},{"id":285,"depth":385,"text":286},"how-to","2026-05-26","Know exactly where your signups come from. Automatic UTM and ?ref= detection, per-source signup counts, and SDK event tagging -- all from one script tag.",false,"md",[399,401,403,404,405],{"question":317,"answer":400},"Yes. Every pageview captured by OperatorStack records utm_source, utm_medium, and utm_campaign when they are present in the URL. No extra configuration.",{"question":330,"answer":402},"The ?ref= parameter carries a referral code from your waitlist sharing links. OperatorStack reads it on load and attributes the resulting signup to the correct referrer.",{"question":339,"answer":342},{"question":345,"answer":348},{"question":351,"answer":406},"Yes. Use OperatorStack.trackEvent('event_name', { source: 'your_source' }) to attach any source label to a custom event.","track referral sources,landing page referral tracking,utm source tracking,referral attribution,where do signups come from,track traffic sources landing page,utm parameters landing page",{},true,"Stop guessing where your signups come from. OperatorStack captures UTM params and ?ref= codes automatically. See the breakdown in your Analytics tab.",null,"/blog/how-to/track-referral-sources","6 min","[object Object]","HowTo",{"title":5,"description":395},{"loc":412},"blog/how-to/track-referral-sources",[],"summary_large_image","J6N1RKXx0mwTjymGbFJBfsy2zj-7rHOqD-n2qWkMNA0",1779798569227]