WordPress

How to Add Affiliate Program to WordPress with Blossu

Add referral tracking to your WordPress site using a plugin (recommended) or by editing your theme directly.

Image: WordPress + Blossu integration overview

Option 1: Use a plugin (recommended)

1

Install the Insert Headers and Footers plugin

Go to Plugins → Add New in your WordPress admin dashboard. Search for "Insert Headers and Footers" by WPCode.

Click Install Now, then Activate the plugin.

Image: Installing the WPCode plugin in WordPress
2

Add the tracking script

Go to Settings → Insert Headers and Footers (or Code Snippets → Header & Footer depending on the plugin version).

Paste this code in the Header section and save:

HTML
<script
  async
  src="https://js.omnifamous.com/v1/blossu.js"
  data-program-id="YOUR_PROGRAM_ID"
></script>

Replace YOUR_PROGRAM_ID with your actual program ID from the Blossu dashboard.

Image: Adding the script in WPCode settings

Option 2: Edit theme directly

Note

This method will be overwritten when you update your theme. We recommend using Option 1 or creating a child theme.

1

Open the Theme Editor

Go to Appearance → Theme Editor in your WordPress admin dashboard.

2

Edit header.php

In the right sidebar, click on header.php (Theme Header).

Find the closing </head> tag and paste the tracking script just before it:

HTML
<script
  async
  src="https://js.omnifamous.com/v1/blossu.js"
  data-program-id="YOUR_PROGRAM_ID"
></script>

Click Update File to save your changes.

Image: Editing header.php in WordPress Theme Editor

Verify the installation

To verify the script is working:

  • Visit your site with a test referral link (e.g., yoursite.com?via=test)

  • Open your browser's developer console

  • Check if window.blossu_ref_id is defined

Next steps

Now that you have tracking set up, you need to connect your payment platform to automatically track conversions and calculate partner commissions.

Join the Omnifamous waitlist

Tell us about your site and we'll let you in when your spot opens up.