Hi, is it possible to add a custom tracking script inside a Hubspot form that is embed on a website, so we know who referred that person who submitted the lead form and then converted into a customer later?
Here is the flow
- User is directed to the page on a website containing the Hubspot form, by clicking on a referral link from somwhere
- They enter their name and email address into the Hubspot form
- The script will capture their name and email from the Hubspot form fields and also who they were referred by.
The Hubspot user will be using a paid Hubspot account.
I was not able to see where we could add a 3rd party script to a Hubspot form.
Any ideas?
Thanks
Pete
Hey @upgive,
Does the referral link contain the referral information on the url parameter? i.e. Unlocking the Power of Referral Link: A Game-Changer for Your Online Presence?
If so, you can grab the url parameter with javascript (resources: Quick Tip: Get URL Parameters with JavaScript — SitePoint), store it in variables and pass the variables as the form fields value. You can also set the HubSpot form field to be hidden.
Would the suggested solution above work for your team use case?
Hi Wendy, thanks for getting back to me. Unfortunatley, those methods would not work.
I noticed when creating the hubspot form, you can choose an option to embed as HTML, rather than an iFrame. This would work for us, but as we do not yet have a paid account, and we are creating a product for hubspot users, is it possible you can provide me with example HTML for your form so we can test this method? We could then ask our customers who use hubspot forms to use this method.
Thanks
Pete
Hey @upgive,
In this case, I’d suggest for you to create a test account within your developer account and if you don’t already have a developer account, you can sign up for one here.
On the test account portal, you can try creating form and set it as raw HTML form.
Additional documentation: How do I create a test account?.
Thanks Wendy, that is really helpful and will setup a dev account.
Have a good weekend.
Pete