WordPress

Note: ReferralHero cannot be used on free hosted WordPress.com websites, as these platforms do not support the installation of custom plugins. Additionally, custom JavaScript is blocked from being embedded on such sites. If your WordPress blog uses caching plugins, please ensure you clear the cache to properly integrate the script.

To install the ReferralHero Tracking Code on your WordPress theme, one option is to add it directly to the header.php file. However, modifying the theme in this way will only affect your local copy of the theme. This means that if the theme is updated or re-installed later, your changes, including the ReferralHero Tracking Code, will be lost.

To avoid this, we recommend using a WordPress Script Management Plugin. This approach ensures that your tracking code remains intact, even if the theme is updated.

Installing ReferralHero using a Script Installation Plugin

Step 1: First, check if you already have a header/footer script management plugin installed on your WordPress website. If you do not have one, there are several free options available to help you add scripts to the header or footer of your site. We recommend using either WPCode or OH Add Script to Individual Pages Header Footer.

Step 2: Install the selected header/footer script plugin on your WordPress website.

While issues with installing a WordPress script management plugin are uncommon, please note that any plugin you choose is not managed by ReferralHero. If you encounter any difficulties during installation or face compatibility issues, you will need to contact the plugin's author for support.

Step 3: Go to your ReferralHero Campaign Overview > Edit Campaign > Launch instructions and copy your ReferralHero Global Tracking Code.

Step 4: Use the plugin you installed to paste the ReferralHero Tracking Code into the header of your site. If you are using the OH Add Script plugin, paste the script into the designated box as shown below.

In add script to be added to the header of the page , add you global tracking code:-

!function(m,a,i,t,r,e){if(m.RH)return;r=m.RH={},r.uuid
=t,r.loaded=0,r.base_url=i,r.queue=[],m.rht=function()
{r.queue.push(arguments)};e=a.getElementsByTagName('script')
[0],c=a.createElement('script');c.async=!0,c.src=
'https://referralhero-global-code.s3.amazonaws.com/'+'production'+
'/'+t+'.js',e.parentNode.insertBefore(c,e)}(window,document,
'https://app.referralhero.com/','RHxxxxxxxxx');

Replace 'RHxxxxxxxxxx' with your unique uuid.

Step 5: Download the ReferralHero plugin and install it on your website.

Step 6: Add the ReferralHero embeddable widgets on your page by pasting the special shortcode <div id='referralhero-dashboard-MFxxxxxxxxxx'></div> exactly where you want the form to appear in your page.

Replace the MFxxxxxxxxxx with your specific campaign UUID.

Last updated