Skip to main content

Installing Your RB2B OEM Tracking Script

📌 OEM Partners Only
This guide is intended for participants in the RB2B OEM Program. If you are a standard RB2B customer, please refer to the main installation guide for instructions specific to your account.

As an RB2B OEM partner, you’re provided with a custom tracking script that enables visitor identification on your customers' domains. This script powers the core of the RB2B functionality, allowing real-time pageview data to flow through your webhook once installed.

⚠️ Note: The tracking script will only function on domains that have been explicitly added via the OEM Domain Management API. If a domain isn’t added, no data will be collected—even if the script is installed.

Where to Find Your Script

To access your bespoke tracking script:

  1. Go to your Dashboard at https://app.rb2b.com/oem_dashboard

  2. Locate the Script Setup card

  3. Click View Script Installation

  4. Copy the full script tag provided

How to Install the Script

Place the script tag in the <head> of each page you want to track.

Basic Installation Example:

<head>
<!-- RB2B OEM Tracking Script -->
<script>...</script>
</head>

Best Practices:

  • Install it site-wide (via your CMS template or tag manager)

  • Do not modify the script URL

Optional: Add a customer_id to Associate Visitors

If you're installing the script on behalf of your customers, you can pass a customer_id value to help identify which of your clients a visitor belongs to. This value will be included in the webhook payload alongside visitor data.

Installation with customer_id:

<head>
<script>
window.rb2bConfig = { options: { customer_id: 'customer-12345' } };
</script>
<script>
!function(key) {
if (window.reb2b) return;
window.reb2b = {loaded: true};
var s = document.createElement("script");
s.async = true;
s.src = "https://ddwl4m2hdecbv.cloudfront.net/b/" + key + "/" + key + ".js.gz";
document.getElementsByTagName("script")[0].parentNode.insertBefore(s, document.getElementsByTagName("script")[0]);
}("YOUR-ACCOUNT-ID");
</script>
</head>

Webhook Payload Addition:

{
"customer_id": "customer-12345"
}

Tips:

  • You can dynamically inject the customer_id server-side if you're templating multiple customer domains.

  • This helps you map traffic data back to your internal accounts more easily.

Did this answer your question?