Register people into your referral program through your sign-up form and re-direct them to their referral link on your Thank You page.

Here is what you will learn in this tutorial.

  1. Connect your website to your iRefer account. 
  2. Specific campaign settings required.
  3. Connect your sign-up form to your referral campaign.
  4. Embedding the sharing widget in your page.
  5. Testing your campaign

Here is the flow of a SaaS referral program and where you will need to integrate our code outlined in the steps below.

1. Connect your website to your iRefer account.

Step 1
Navigate to your campaign by clicking on the "Edit" button in your Dashboard.

In the left navigation, click on the "Installation" button, then "Custom website" as shown in this screenshot.

Copy the line of code as shown in "Step 1" of this screenshot. 

Step 2
Install this script on your website site by pasting in before the closing </body> tag of the page.

Step 3
Refresh the home page of your website. Then refresh this page. If installed correctly, you should see a green check here.

2.Specific campaign settings required

There are some specific campaign settings you need to set.
On the "Initial setup" page choose the "Embedded" form style and change the shortcode from <div id="shortcode"></div> to <div id="sharewidget"></div>

Click on "Advanced Options" and choose "Yes" for "Automagically sign-up new participants?"

Click Save and Continue.

For this type of campaign, you can skip the following page - "Sign-up form"  as you will be using your form.

3. Connect your Gravity Form to your referral program

You need to pass the user's email address into your referral campaign using a query string in the URL. In your WordPress CMS, choose your Gravity Form and then navigate to "Settings > Confirmations". 

For Confirmation Type choose "Redirect" and enter the URL of the page you want to redirect the person after they submit your form. Next, paste the following code as shown below.


You need to make sure that the email field ID is the same. For example {Email:2} matches the field ID as shown below:

4. Embedding the sharing widget into your page 

Now we need to insert the shortcode below into the HTML part of any page on your website.  This can be the "Thank You" page after they have submitted your form or you can even create a new page like "Refer-a-Friend" to display this widget.

<div id="sharewidget"></div>

After submitting your form, the person will then see this sharing widget embedded in your page. You can place content around this widget to explain what rewards they will get for referring friends.

5. Testing your campaign

Now let's test your campaign to make sure everything is correctly setup.

When someone signs up through your form and submits, their email address should have been passed in the URL as a query string.

When that person visits the page you placed the shortcode <div id="sharewidget"></div>, they will see their unique referral link which they can start sharing right away. A Welcome email will also have been sent to their inbox.

Did this answer your question?