Typeform
Last updated
Last updated
Typeform allows you to create a dynamic and customizable sign up form while using ReferralHero as your backend to power your referral program! You may want to use Typeform if you are looking to improve the user sign up experience or to collect additional user opt-in data than you can collect with the native ReferralHero widget. This is also a great option if you are not a developer as the set up with Typeform is very easy!
There are two methods to integrate ReferralHero with Typeform:
Use Typeform's 'Redirect to URL' feature
Use Zapier to connect Typeform and ReferralHero
You will need a Typeform Plus account or higher to use the Redirect feature.
General user journey:
Referral visits your website and gets cookied
Referral visits your webpage with your Typeform embedded on it or your Typeform hosted site
Referral completes Typeform and is redirected back to your website with their email in the URL parameter
Call RH JavaScript on page load
‘Redirect to URL’ sends respondents to a single link of your choice after they click Submit on your Typeform.
Create a Typeform page to accept the respondent's email address (or another unique identifier)
Add a ‘Redirect to URL’ ending by clicking the + sign next to Endings in the left-hand sidebar of the Create panel
In the settings of the redirect ending, follow these steps to add variable value captured from the ‘unique identifier’ page to the redirect link
i. Add your referral landing page URL in the following format to the Settings: https://mywebsite/myreferralprogram?email=
ii. Click the + sign in the Settings to add the variable value, i.e. the email from the ‘unique identifier’ page, to the end of the redirect URL
iii. Make sure the final redirect URL looks like the following example: https://mywebsite/myreferralprogram?email=subscriberemail@test.com
Make sure you have added the ReferralHero Global Tracking script to the <head> tag of your website
In addition, add one of the following scripts to the <head> tag of the Redirect URL page
Use RH.form.submit() to add both organic and track referrals to the referral campaign
Use RH.pendingReferral() to track only referrals with ‘Pending’ status to the multi-step conversion event campaign
Use RH.trackReferral() to track referrals only on the redirect page
Use RH.organicTrackReferral() to track referrals OR add organic subscribers on the redirect page
You will need a Typeform account and a Zapier account before you start.
Log in to your Typeform account
Create a new Typeform that can accept at least two RH required fields: name and email address (turn on the setting ‘Required’)
On the right side panel, go to Logic > Advanced > Hidden Fields
4. Add a Hidden Field then change the name of the hidden field from @hidden1 to @mwr, then click save.
5. Publish the Typeform
In Typeform, go to the tab ‘Share’
Choose the way you want your Typeform to be embedded in your web page
For example, go to ‘Standard’ if you want to present the Typeform as part of your website Click ‘Get the code’, then click ‘Copy code’
Click ‘Get the code’, then click ‘Copy code’
4. Go to your web page, paste the code to where you want your Typeform to appear on the page
5. Add the following to the code between the data-tf-widget and data-tf-hidden parameters: data-tf-transitive-search-params="mwr"
Your code will be slightly different but these can be used as a reference:
Example 1:
<div data-tf-widget="kNf27gP8" data-tf-transitive-search-params="mwr" data-tf-hidden="mwr=xxxxx" style="width: 100%; height: 400px;"></div><script src="//embed.typeform.com/next/embed.js"></script>
Example 2:
<div data-tf-live="01HY080H5B5WHFVCYN5ZJ3RDH2" data-tf-transitive-search-params="mwr" data-tf-hidden="mwr=xxxxx"></div><script src="//embed.typeform.com/next/embed.js"></script>
6. Save the code
Log in to Zapier
Create a new Zap
Search for Typeform as the Trigger App
The Trigger Event is ‘New Entry Triggers when a form is submitted’
5. Connect your Typeform account
6. Choose the Typeform form you set up in the previous step in the Set Up Trigger
7. Search for ReferralHero as the Action app
8. The Action Event is ‘Add Subscriber Adds a new subscriber to a list’
9. Connect to your ReferralHero account by entering the API Key
10. In the Set Up Action, the following five fields are mandatory fields
Campaign: your ReferralHero campaign
Email address: Typeform email
Referral URL: your default referral link address
Full name: Typeform name
Referrer: Mwr (hidden field)
11. Then Test & Continue
12. Turn on Zap