We are developing a referral program targeted at our top customers based on their NPS scores. The idea is to have these customers refer new contacts by sending out a pre-crafted email template to their networks. When a recipient clicks the CTA, they'll be directed to a landing page with a form where they can provide their contact information.
Our goal is to send this initiative to around 300 customers. I'm interested in using a similar approach to the one outlined in this community post but need guidance on how to have the referral code automatically populate as a hidden field in the form.
I’m looking for a solution that doesn’t require creating unique tracking links, forms, or landing pages for each customer.
Key criteria:
- The new contact should be the one completing the form. - The form needs a hidden field that automatically links back to the referring customer. - We need to track and report the number of contacts each customer refers. - We also want to send a thank you message to the referring customer, notifying them when someone submits the form and outlining the next steps or incentives.
Any advice or suggestions would be greatly appreciated!
that's a really nice use case, thanks for bringing it up! I love such challenges and may have an automated solution approach for which you only need one form and one landing page. Tracking and reporting will be done with the help of two custom properties and one or two workflows, we'll see how it works out. Check this out:
Set Up two Custom Properties:
e.g., "Referral Code". This property will store the referral codes for your top customers.
e.g., "Referral Count". This property will keep track of how many referrals your clients have generated.
Assign Referral Codes to Your Top Customers:
Assign a unique referral code to each of your 300 top customers. This can be a simple alphanumeric code.
Then, manually or via import, update the custom property in each customer’s contact record with their specific referral code.
Create the Pre-Crafted Email Template that your customers will use to refer new contacts.
In the template, include a CTA button or link that directs recipients to the landing page with the form.
In the URL of the CTA, append a query parameter that includes the customer's unique referral code. For example:
This URL will dynamically insert the customer's referral code into the link.
Design the Landing Page and Form
Develop a landing page with a form where new contacts can submit their information.
On the form, add your custom property "Referral Code" as a hidden field. Make sure that the query parameter in your URL matches exactly the internal name of your custom property. If that parameter is present when the form is submitted, it will be collected by the form submission event. See here for more information.
Track Referrals Using Workflows
Set up a workflow that triggers whenever the form is submitted. Make sure to turn on re-enrollment.
Use the referral code captured in the hidden field to identify the referring customer. This can be done by setting a conditional step in the workflow that matches the referral code in the form submission with the referral code property in your customer records. I'd create a branch based on filter criteria, choose the custom propery "Referral Code" and select "is equal to any of" ...you have to copy / paste all the referral codes then there.
When a match is found, update the custom property "Referral Count" property in the referring customer’s record. You may have to work with association labels here or create a second workflow that enrolls the referring clients.
Send a Thank You Message
After updating the referral count, send an automated thank you email to the referring customer via the newly created workflow...or even the same workflow if you can find a way to do so.
Reporting and Analytics
Use HubSpot's reporting tool to create a report that shows the number of referrals generated by each customer, based on the "Referral Count" property.
Let me know if you have any questions.
Best regards
Adriane
✔️ Did my post help answer your query? Help the community by marking it as a solution.
Adriane Grunenberg HubSpot Automation and Digital Analytics Expert
that's a really nice use case, thanks for bringing it up! I love such challenges and may have an automated solution approach for which you only need one form and one landing page. Tracking and reporting will be done with the help of two custom properties and one or two workflows, we'll see how it works out. Check this out:
Set Up two Custom Properties:
e.g., "Referral Code". This property will store the referral codes for your top customers.
e.g., "Referral Count". This property will keep track of how many referrals your clients have generated.
Assign Referral Codes to Your Top Customers:
Assign a unique referral code to each of your 300 top customers. This can be a simple alphanumeric code.
Then, manually or via import, update the custom property in each customer’s contact record with their specific referral code.
Create the Pre-Crafted Email Template that your customers will use to refer new contacts.
In the template, include a CTA button or link that directs recipients to the landing page with the form.
In the URL of the CTA, append a query parameter that includes the customer's unique referral code. For example:
This URL will dynamically insert the customer's referral code into the link.
Design the Landing Page and Form
Develop a landing page with a form where new contacts can submit their information.
On the form, add your custom property "Referral Code" as a hidden field. Make sure that the query parameter in your URL matches exactly the internal name of your custom property. If that parameter is present when the form is submitted, it will be collected by the form submission event. See here for more information.
Track Referrals Using Workflows
Set up a workflow that triggers whenever the form is submitted. Make sure to turn on re-enrollment.
Use the referral code captured in the hidden field to identify the referring customer. This can be done by setting a conditional step in the workflow that matches the referral code in the form submission with the referral code property in your customer records. I'd create a branch based on filter criteria, choose the custom propery "Referral Code" and select "is equal to any of" ...you have to copy / paste all the referral codes then there.
When a match is found, update the custom property "Referral Count" property in the referring customer’s record. You may have to work with association labels here or create a second workflow that enrolls the referring clients.
Send a Thank You Message
After updating the referral count, send an automated thank you email to the referring customer via the newly created workflow...or even the same workflow if you can find a way to do so.
Reporting and Analytics
Use HubSpot's reporting tool to create a report that shows the number of referrals generated by each customer, based on the "Referral Count" property.
Let me know if you have any questions.
Best regards
Adriane
✔️ Did my post help answer your query? Help the community by marking it as a solution.
Adriane Grunenberg HubSpot Automation and Digital Analytics Expert
Hi @JHandley4! Welcome to the Community-- happy to have you here 😊
I understand your goal is to use hidden fields on forms to populate a referral code, but ideally would not require unique tracking links. I do think that custom tracking links for the CTAs in the email templates would be the most straightforward and accurate way of achieving this. That said, there may be a workaround using custom coded solutions.
@Mike_Eastwood from the post you linked may have some more details to share. Let's invite some other experts as well! @danmoyle, @Jigar_Thakker, or @Josh -- any suggestions for referral codes on forms to share with @JHandley4? Thanks!
Best, Kennedy
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !
Hey @JHandley4! If you use custom tracking URLs, you can create a unique link for each referrer. Each tracking URL would have a link to the form, but a unique referral code slug to auto populate the form with the query string as explained in this Knowledge Base article. Depending on how many referral codes you have, this could be a pretty involved process.
Let me know if I can clarify!
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !