Javascript Web API
The JavaScript Web API allows you to interact with ReferralHero (e.g: add new subscribers, trigger referrals, get limited participant data, generate the embeddable widgets) using Javascript.

Getting started

The first, mandatory, step is to install the ReferralHero Tracking Code on your website.
So before we go any further, follow these steps to add the Tracking Code to your website:
  1. 1.
    Go to your campaign dashboard > Installation instructions and copy your Tracking Code
  2. 2.
    Add the ReferralHero Tracking Code to your site so that it loads on each webpage. This is typically done by adding it into the <head> section of your website
When you install the Tracking Code your pages get access to the global window.RH object.

Next steps

Before using the more advanced features of the Javascript Web API, you should learn about a couple of important concepts:
After that you can learn about:
Last modified 2yr ago
Copy link