Referral Rock Integration Scripts are the easiest way to integrate your website with Referral Rock. The primary function is to capture the new business on your own site so you can appropriately give credit and rewards to the members of your referral program. This article will explain:
- What are Integration Scripts and how do they work
- How to install Integration Scripts on your website
- How to test and troubleshoot your Script setup
- Adding conversion settings on the program level
What are Integration Scripts and how do they work?
We currently offer two event scripts:
- Conversion Tracking
- Referral Update
The Conversion Tracking script is input on a page that signifies that a conversion, or sale, has happened. This script allows you to create a Referral upon a sale or other desired action and add information (parameters) about your new referral from your own site. The most common place to use the Conversion Tracking script is on a purchase confirmation or thank you page within your e-commerce store.
Our Referral Update script is used when your sales process has more than one step and you need to move referrals between these steps. For instance, you might use the Referral Update script to:
- Move a Referral from the Pending to the Qualified status after signing up for a free trial
- Move a Referral from the Qualified to the Approved status after they convert from a free trial to a paid user
- Move a Referral from the Pending to the Approved status after they sign a contract
This allows you to automatically record where a Referral is in your process and update their status within Referral Rock accordingly. Utilizing the referral statuses within Referral Rock is essential to mapping your sales process to the Referral lifecycle and generating rewards appropriately. Note that you do not need to use every referral status.
How to install Integration Scripts on your website
Adding Integration Scripts to your website is a simple process. Follow the steps below to install your Integration Scripts on your site.
Step 1: Install the Event Script
- Go to Integrations > Setup then select the Conversion Script or Referral Update Script
- Copy the code in the grey box and install on your website after the closing
- Configure the script to match the Referral Rock parameters (like name, email, etc.) to the merge tags or placeholder names in your service or platform. We have a lot of services pre-mapped in the External Service Integrations section, so check if your service or platform is there already to save some time. If you need help mapping parameters, please reach out to Referral Rock support. Be sure to include what service you are using and what parameters you want to map.
Testing your Integration Scripts
Once you have completed the integration scripts installation, we recommend you test them in order to ensure they are working correctly and you are pulling all the necessary Referral information.
The Event Log
The Event Log is a great place to make sure that referrals and their information is being captured properly. Using the Event Log, you can view a list of all the integration events that are associated with your Referral Rock account. When you select details, you are able to view all the data being passed by the integration scripts and confirm that the desired parameters are being passed correctly.
Using the Event Log, you can confirm you are tracking conversions properly. However, if you check out your Event log and notice it is missing or pulling incorrect data, you might be making one of these common mistakes:
|What Is Happening||What Causes It||How to Fix It|
|Event Log is showing: Info - No Tracking ID.||User did not go through a referral link before conversion.||This happens when the conversion script fires but the user does not have a Referral Rock cookie from a member on their browser. If you are testing conversion tracking, ensure that you click through a live member's referral link. This can also happen if users switch devices, as member cookies are device specific.|
Conversion Settings for your Individual Program
Once you set up your Integration Scripts, it is set up for the whole site on the account level. However, if you are interested in running multiple programs with different conversion tracking logic, we allow you to add Conversion Settings on the program level. For instance, if you want Referrals to be automatically approved for one program and not the another or set an expiration date for the cookie, you can do so in Conversion Settings.
To access your Conversion settings, go to your Program > Edit Program > Additional Options and select Conversion Settings.