# How to Track Referrals From HubSpot Forms > Credit every referred HubSpot form lead to the right referrer. Set your embedded HubSpot form to raw HTML and GrowSurf tracks it with no code. - URL: https://growsurf.com/integration-guides/hubspot-forms-referral-tracking/ --- [← View All Guides](/integration-guides/) Set your embedded HubSpot form to raw HTML, and GrowSurf credits every referred lead to the person who referred them. No code needed. Want the full setup walkthrough? Use these docs for exact setup steps, supported fields, and troubleshooting. [HubSpot form setup guide](https://knowledge.hubspot.com/forms/create-forms) [HubSpot forms on external sites](https://knowledge.hubspot.com/forms/set-up-and-style-your-form-on-an-external-site) When a referred friend fills out the HubSpot form on your website, GrowSurf can add them to your referral program and credit the person who sent them. Once the form renders as raw HTML on your page, GrowSurf can see it and track it without any code. You change two settings on the form and tell GrowSurf about your thank-you page. The same setup works for an affiliate program. There, GrowSurf credits each lead to the affiliate who sent it. You need HubSpot Marketing Hub or Content Hub Professional or Enterprise. The form must be built in HubSpot’s legacy form editor and embedded on your own website. The stand-alone share.hsforms.com link does not work. ## Integration Steps ### Open the HubSpot 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 HubSpot icon and leave *HubSpot form type* set to **Lead form**. 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 HubSpot 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 HubSpot selected, showing the requirements and the first setup stepsPrep your form lists what HubSpot needs before you start. ### Send the form to your thank-you page In HubSpot, go to **Marketing** > **Forms** and open the form that is embedded on your website. On the **Options** tab, under *What should happen after someone submits this form*, choose **HubSpot page or External URL** and enter the address of your thank-you page. ### Set the form as raw HTML On the **Style & preview** tab, turn on **Set as raw HTML form**. HubSpot then renders the form as plain HTML on your page instead of inside a frame, so GrowSurf can read it. HubSpot’s form styling no longer applies, so your site’s styles take over. ### Choose automagic tracking in GrowSurf Back in GrowSurf, choose **Automagic form tracking (no code)**. When GrowSurf asks whether your signup form redirects people to another webpage, choose **Yes** and enter the same thank-you page address. 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. #### Booking meetings instead? For an embedded HubSpot meeting form, follow [this setup for HubSpot meeting forms](https://support.growsurf.com/article/367-how-to-add-referral-tracking-to-a-hubspot-meeting-form). Recommended Guides [HubSpot logo How to Sync GrowSurf Referral Data into HubSpot CRM Use the native HubSpot sync so your team can see share links, referral status, and referrer details on the contact record. View Guide →](/integration-guides/hubspot-referral-tracking-crm/) [HubSpot logo How to Personalize HubSpot Referral Emails with GrowSurf Use GrowSurf contact properties in HubSpot emails and workflows so every participant sees their own referral link and referral context. View Guide →](/integration-guides/hubspot-referral-email-workflows/) [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/) ## FAQ #### Does this work with forms built in HubSpot’s new form editor? No. Only forms built in the legacy form editor can be set as raw HTML, and this setup needs raw HTML. #### Which HubSpot plan do I need? Marketing Hub or Content Hub Professional or Enterprise. Those plans include the raw HTML setting. #### Do I need to add any code? No. GrowSurf watches the form through the GrowSurf Universal Code, which the installation steps help you add to your site. ## 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.