# How to Track Referrals From Formsort Flows > Credit every referred Formsort respondent to the right referrer. Add one GrowSurf code block to the page that hosts your Formsort flow. - URL: https://growsurf.com/integration-guides/formsort-referral-signup-tracking/ --- [← View All Guides](/integration-guides/) Hook GrowSurf into your Formsort web embed, and every referred respondent who finishes the flow is credited to the person who referred them. Want the full setup walkthrough? Use these docs for exact setup steps, supported fields, and troubleshooting. [GrowSurf Formsort setup guide](https://docs.growsurf.com/integrations/formsort) [Formsort embedding](https://docs.formsort.com/publishing-and-deployment/embedding) When a referred friend finishes your Formsort flow, GrowSurf can add them to your referral program and credit the person who sent them. Formsort’s web embed hands the collected answers to your page when the flow ends. A GrowSurf code block on that page reads the email address and name. You add one code block to the page that hosts the flow. Your Formsort embed code stays as it is. The same setup works for an affiliate program. There, GrowSurf credits each lead to the affiliate who sent it. The flow must be embedded on your own website, and Formsort must be allowed to send answers to your domain. The stand-alone formsort.app link does not work. ## Integration Steps ### Open the Formsort setup in GrowSurf In the Program Editor, go to **Installation** and continue to the step that asks how GrowSurf will know a referred friend signed up. Under *Using a form builder? Prep your form first*, click the Formsort icon. The GrowSurf installation step that asks how GrowSurf will know a referred friend signed up, with a row of form builder iconsThe form builder icons sit under the question in Program Editor > 5. Installation. The **Prep your form** window opens with Formsort selected. Keep it open while you work. It lists every step and holds the code you paste later. The GrowSurf Prep your form window with Formsort selected, showing the requirements and the first setup stepPrep your form lists what Formsort needs before you start. ### Allow your domain in Formsort Formsort only sends answers to domains you allow. In Formsort Studio, open **Security**, then **Embedding domains**, and add your website’s domain. A wildcard such as `*.example.com` covers your subdomains. ### Add the GrowSurf code to your page Copy the code block from the Prep your form window and add it to the page that hosts your flow. You do not need to change your Formsort embed code, whether or not **Load immediately** is checked. When someone finishes the flow, Formsort tells your page, and the GrowSurf code picks it up. GrowSurf reads the email address from the answer stored as `email` or `email_address` (the key Formsort gives its email question), or else from the one answer that is an email address. It reads the name from `first_name` and `last_name`, or a single `full_name`. ### Finish the installation Back in GrowSurf, choose **Programmatic** as the way GrowSurf will know a referred friend signed up. Then finish the remaining installation steps. ## Tips #### Test it with a real referral link Open your own referral link in a private browser window, then fill out the form. The new person should show up in GrowSurf as referred by you. Visiting the form directly does not add anyone, so test through a referral link. #### Serving the flow from your own domain? The GrowSurf code only listens to flows served from Formsort’s own addresses (formsort.app or formsort.com). If your flow runs on your own domain, change `FORMSORT_ORIGIN` in the code block to match that domain. Recommended Guides [Embeddables logo How to Track Referrals From Embeddables Flows Add one Action to your Embeddable, and every referred respondent is credited to the person who referred them. View Guide →](/integration-guides/embeddables-referral-signup-tracking/) [Typeform logo How to Track Referrals From Typeform Signups Send Typeform respondents to your thank-you page with their answers, and GrowSurf credits every referred signup to the person who referred them. View Guide →](/integration-guides/typeform-referral-signup-tracking/) [Zapier logo How to Sync Referral Leads to Your CRM with Zapier + GrowSurf Use GrowSurf's New Participant trigger in Zapier to create or update CRM records when someone joins your referral program. View Guide →](/integration-guides/zapier-referral-crm-sync/) ## FAQ #### Which Formsort embed do I need? The embed code Formsort Studio gives you works, with **Load immediately** checked or not. So does Formsort’s web embed API. The stand-alone formsort.app link does not work. #### The flow finishes, but nobody shows up in GrowSurf. Why? Check that your domain is listed under **Security** > **Embedding domains** in Formsort Studio. Without it, Formsort sends no answers to your page. Also check that you tested through a referral link. #### Will people who were not referred be added? No. The code adds someone only when GrowSurf can tell who referred them. A visitor who found your Formsort form on their own is not added to your program. ## Turn word of mouth into steady growth from your customers Launch a refer-a-friend or affiliate program that lowers your acquisition costs and builds customer loyalty, with little engineering work. [Launch Your Program](https://app.growsurf.com/signup) 14-day free trial No credit card required Trusted by marketing and product teams that grow through customer, user, and partner referrals. ## Built for lean teams, scaled for category leaders Thanks. You're signed up. Something went wrong. Please try again.