Skip to main content

RB2B Install Guide for WordPress

Updated over 2 weeks ago

If you are using Elementor as a site builder, this method will not work.

If you are using WP Rocket in conjunction with your WordPress installation, please ensure that you exclude RB2B from WP Rocket's "Delay JavaScript Execution" function. Details on how to achieve that here.

Integrating our script into your WordPress website is a straightforward process. Here’s a step-by-step guide to help you do this through the theme editor.

Proper installation ensures that your RB2B tracking is set up smoothly, avoiding issues such as page glitches and ensuring accurate data collection.


Copy the RB2B Script

Start by ensuring that you have the RB2B script ready. You can find it in the Script section of the dashboard. Copy the entire code snippet to your clipboard, preparing it for embedding into your WordPress site.

Alternatively, if your WordPress theme includes a 'Header Code Injection Field,' you can paste the script there for convenience. Plugins designed for custom header code injection are another option to consider.

Log in to WordPress and navigate to Appearance then Theme File Editor

First, access your WordPress site's admin area by logging in with your credentials. In your dashboard, go to the 'Appearance' section and select 'Theme Editor'. This will open the editor where you can modify your site's theme files.

Find and select Theme Header

Within the Theme Editor, you will see a list of theme files on the right side. Locate and click on the 'header.php' file. This file generally contains the head section of your website’s HTML, where scripts are typically added.

Paste the tracking script inside the <head> tag just before the closing </head> tag

In the 'header.php' file, scroll to the part where the head section ends (just before the closing </head> tag). Here, paste the script provided by us. Be careful not to overwrite any existing code.

Ensure the script is not nested within other tags and avoid duplicating it in other theme files to prevent functionality issues.

Save your file by clicking Update File

After pasting the script, click on the 'Update File' button to save your changes. This action will apply the script to your entire website.

Troubleshooting Common Errors

Improperly installed tracking scripts can cause issues such as blank screens or website glitches. To avoid these problems:

  • Use Correct Formatting: Ensure the '<script>' tag is properly closed without any typos.

  • Avoid Duplication: Verify the script is added only once and not repeated in other files.

  • Utilize Theme Features: If your theme provides a 'Header Code Injection Field,' use it to simplify the installation process and minimize errors.

Did this answer your question?