The WordPress plugin
Connect a WordPress site with the Pixel Relay plugin, which loads the tracker and sends form, WooCommerce and custom events.
Pixel Relay for WordPress connects a WordPress site to its website in Pixel Relay with the API key. It loads the tracker and sends events without any code. It needs WordPress 6.3 or newer and PHP 7.4 or newer.
- Step 1: Addons lists the plugins that connect a site to the relay. Each card shows the latest version.
- Step 2: Click Install guide & versions.
- Step 3: Follow the install steps. You will need the website's API key from its settings page.
- Step 4: Click Download to get the zip for WordPress, Plugins, Add New, Upload Plugin.
Download it
- In the top bar, click Addons.
- Click Download on Pixel Relay for WordPress for the latest version, or Install guide & versions for the steps and older versions.
If you do not see Addons, ask your account team for the plugin.
Install it
- In WordPress, go to Plugins, Add New, Upload Plugin and upload the zip.
- Activate Pixel Relay, then open Settings, Pixel Relay.
- Paste the Pixel Relay address (
https://pixelrelay.co) and the website's API key, from its settings page under Install the tracker. Save. - Press Test connection.
- Follow the plugin's Setup guide tab to choose which events to send.
Do not also paste the tracker snippet into the theme. The plugin adds it.
What it sends
- Page views on every page.
- Form submissions from Contact Form 7, WPForms, Gravity Forms and Elementor Pro forms, as
leadunless you choose another name in the plugin. - WooCommerce:
view_content,add_to_cart,initiate_checkoutandpurchase, with the order value and currency. - Custom events you set up in the plugin, with no code.
Make sure each event name the plugin sends has an event mapping in Pixel Relay, or Meta receives it as an unnamed code.
Sending your own events
The plugin offers several ways to fire an event:
- A shortcode in a page:
[pixel_relay_event name="schedule_appointment" value="150" currency="USD"] - A CSS class on a button or link:
pixel-relay-event-schedule_appointment - Data attributes:
data-pixel-relay-event="schedule_appointment"with optionaldata-pixel-relay-valueanddata-pixel-relay-currency - PHP:
pixel_relay_track('schedule_appointment', ['value' => 150, 'currency' => 'USD']);
Developers can change the tracker settings with the pixel_relay_tracker_config filter, and skip tracking on some pages with pixel_relay_should_track.
Updating
New versions appear on the Addons page. Download the new zip and upload it in WordPress the same way; WordPress offers to replace the installed version. Older versions stay available on the plugin's page in case you need to roll back.
Related articles
Still stuck?
Tell us what you are trying to do and we will help you set it up.