Skip to main content

RB2B Install Guide for WordPress

Updated today

Before You Begin

Using WP Rocket? You must exclude RB2B from WP Rocket's "Delay JavaScript Execution" function before proceeding. Details here.

Choose the installation method that matches your setup:


Method 1: RB2B WordPress Plugin (Recommended)

The RB2B WordPress plugin automatically inserts the tracking script into your site's global header, ensuring it runs on every page.

Installation

  1. Go to the RB2B plugin repository and click Code > Download ZIP to download RB2B-WordPress-Plugin.zip.

  2. In your WordPress dashboard, go to Plugins > Add New Plugin, click Upload Plugin, select the downloaded file, and click Install Now.

  3. Click Activate Plugin once installation completes.

Setup

  1. In your WordPress dashboard, go to the RB2B menu item, or click Settings next to the plugin on the Plugins page.

  2. Log in to your RB2B account and go to the Script Setup page. Copy your Account ID — it appears in the last line of the HTML snippet, just before the closing </script> tag.

  3. Paste your Account ID into the designated field and click Save Changes.

  4. Return to the RB2B Dashboard and follow the on-screen instructions to validate the installation.


Method 2: Theme File Editor

Using Elementor? This method will not work. Use Method 4: Elementor instead.

Step 1 — Copy your RB2B script

Go to the Script section of your dashboard and copy the entire code snippet.

Step 2 — Open the Theme File Editor

In your WordPress dashboard, go to Appearance > Theme File Editor.

Step 3 — Open header.php

In the file list on the right, click header.php.

Step 4 — Paste the script

Scroll to just before the closing </head> tag and paste your script there. Do not overwrite any existing code, and do not nest the script inside other tags.

Step 5 — Save

Click Update File.

If your theme includes a Header Code Injection field, you can paste the script there instead of editing header.php directly.

Troubleshooting

  • Ensure the <script> tag is properly closed with no typos.

  • Confirm the script appears only once — duplication causes errors.

  • A blank screen or site glitch after saving usually means a formatting issue. Re-check the script for missing or extra characters.


Method 3: Third-Party Header Injection Plugin

This method uses a plugin to inject the script without editing theme files. We recommend the Head, Footer and Post Injections plugin, though any plugin that injects code into the header will work.

Step 1 — Copy your RB2B script

Go to the Script section of your dashboard and copy the entire code snippet.

Step 2 — Open Header and Footer settings

In your WordPress dashboard, go to Settings > Header and Footer (exact label may vary by plugin).

Step 3 — Paste the script

Find the <HEAD> section (often labelled something like "Scripts in header" or "ON EVERY PAGE") and paste your script into the text box.

Step 4 — Save

Click Save at the top of the page.


Method 4: Elementor

If you are building with Elementor, use this method instead of the Theme File Editor — Elementor manages its own header templates separately.

Step 1 — Copy your RB2B script

Go to the Script section of your dashboard and copy the entire code snippet.

Step 2 — Open your Header template in Elementor

Navigate to your Header and Footer section in Elementor and click Edit with Elementor.

Step 3 — Add an HTML widget

Drag the HTML widget from the Elementor panel into the header section. Adding it to the header ensures the script runs on every page.

Step 4 — Insert the script

Click Edit on the HTML widget and paste your RB2B script into the HTML Code editor. Ensure it includes both the opening <script> and closing </script> tags.

Step 5 — Save and clear cache

Save your changes, then clear any active caching plugins to ensure the update is published.

Troubleshooting

Common issues include missing script tags, placing the script outside the header template, or a caching plugin serving a stale version of the page. Double-check all three if the script doesn't appear to be working.

Prefer a plugin-based approach? You can also install via Method 3: Third-Party Plugin.

Did this answer your question?