Install the pixel on WordPress

Add the RAVE™ pixel to every WordPress page with a header and footer plugin or your block theme's header.

2 min read · Updated Oct 5, 2026

On WordPress the RAVE™ pixel goes in your site-wide header, so it loads on every page. There are two common ways to add it.

Before you start

  • Add your WordPress domain as a site in RAVE™. See Add a site.
  • Copy the site's snippet: in your RAVE™ workspace, click Sites, open the site, and use the copy button under 1. Install the pixel.
<script async src="https://rave.cxformula.com/pixel.js" data-site="YOUR_SITE_KEY"></script>

This is the easiest route and survives theme changes and updates.

  1. Install a header plugin

    For example WPCode or Insert Headers and Footers, from Plugins → Add New in your WordPress admin.

  2. Open the header setting

    In the plugin, go to Code Snippets → Header & Footer.

  3. Paste into Header

    Paste your RAVE™ snippet into the Header box.

  4. Save

    The pixel now loads on every page of the site.

Option 2: a block theme's header

If you use a block theme and prefer not to add a plugin:

  1. Open the Site Editor

    Go to Appearance → Editor.

  2. Edit the header

    Open the header template part.

  3. Add a Custom HTML block

    Paste your RAVE™ snippet into it.

  4. Save

    Save the template part so it applies site-wide.

Check that it works

  1. In RAVE™, open a live campaign on this site and click Send test event.
  2. Open your site in a private browser window (so you're not served a logged-in or cached version).
  3. A sample card should appear within about a minute.
  4. Click Delete test events on the campaign page when you're done.

Troubleshooting

  • Nothing shows after saving. Clear your caching or optimization plugin's cache, and any CDN cache, so visitors get the new header.
  • An optimization plugin delays or combines scripts. If cards don't appear, exclude pixel.js from script delay or combine settings.
  • Cards show on checkout. Add checkout and thank-you paths to the campaign's Hide on rules on the Pages tab.

Next steps

  • Opt-in forms: most form plugins work with RAVE™'s auto form capture. In your campaign's Sources tab, add an Auto form capture rule for the page with the form, and submissions are recorded as sign-ups with no webhook.
  • WooCommerce orders: send them with a WooCommerce webhook pointed at your campaign's webhook URL. See How webhooks work.

The original guide is at /docs/wordpress.

Was this helpful?

Can't find it?

Send us a question, a bug or an idea. It goes straight to the RAVE™ team, and you can follow its status.

Send feedback