WPForms (WordPress Forms)

Using WPForms to capture referral information is ideal for any sales process that requires leads to fill out a form. We'll go step-by-step through the setup needed to redirect referrals to your form and to track referral form completions.

Setting up the Referral Redirect Page

Step 1: Obtain the link to the page where your form is hosted and set this as the referral page in Referral Rock.

  1. Navigate to Program Editor > Share or click here
  2. Under Referral Destination, select Change Destination
  3. Make sure the Webpage Redirect option is selected and enter the URL to the page where your WP Form is hosted.

Referral Conversion Tracking in WPForms

The next step in setting up Referral Rock to work with WPForms is tracking conversions on your form. This will tell us which referral filled out the form, which member sent them, and any information we choose to send back from the form submission to Referral Rock.

WPForms Smart Tags

We will be passing information back to Referral Rock using something that WPForms calls Smart Tags. These are WPForms' way of referencing information submitted with the form. To learn more about Smart Tags, check out this article. Interestingly, while the WPForms site only refers to using Smart Tags in the notification email, they can also be used in the confirmation message. The list of available Smart Tags can be found in WPForms by clicking Notifications > Show Smart Tags (on any field). With the list available, click any smart tag to see it added to the box, usually as something like {field_id="0"}. The number of the field id will change for each form, depending on the order of your form's questions.

Once you find your list of Smart Tags, make note of the field ids that you want to pass back to Referral Rock in the conversion script. For instance, if you want to pass back full name, and that field id is {field_id="0"}, you'll be using {field_id="0"} in our conversion script in the next step.

  1. Login to your Wordpress installation and select your referral form.
  2. Click the Form Settings tab to the left.
  3. Select Confirmation from the menu on the left side of the page.
  4. Select Message as the Confirmation Type and click into the message text box.
  5. In the text box, write whatever confirmation message you would like to appear.
  6. After that, click the Text Button to the top right of the message box to switch the editor from Visual to Text.
  7. Copy your Conversion script from this link and paste it at the bottom of the message text box in WPForms
  8. Now, we'll add the Smart Tags from the step above to the script within the quotation marks after each parameter you would like to send back to Referral Rock.
  9. Click save at the top right. Now when someone successfully fills out that form, a referral conversion event will occur if they reached that form through a Referral Rock referral link.

WPForms Example Event Script

The below script is just an example to show you what a completed script will look like. Yours will have different Smart Tags and a different function call at the bottom, so don't copy and paste from below.
<script type="text/javascript">
window.rrSpace = (
rrSettingsConversion = {
debug: "false",
parameters: {
fullname: "{field_id="0"}",
email: "{field_id="1"}",
externalidentifier: "{field_id="3"}",
phone: "{field_id="7"}"
(function (f, r, n, d, b, y) { b = f.createElement(r), y = f.getElementsByTagName(r)[0]; b.async = 1; b.src = n; b.id = 'RR_DIVID'; y.parentNode.insertBefore(b, y); })(document, 'script', '//example.referralrock.com/webpixel/beta/universalv03.js');
You can add or remove any parameters in the conversion script. They are listed below for your convenience:

firstname, lastname, fullname, companyname, email, externalidentifier, amount, referralcode, conversionstatus, phone, note, publicnote, preferredcontact, customoption1name, customoption2name, customtext1name, customtext2name, customtext3name, customoption1value, customoption2value, customtext1value, customtext2value, customtext3value

WPForms Example Conversion Script In Confirmations Text Box (Screenshot)

How did we do?


Pardot Forms