WPCode Logo

WPCode Documentation

Documentation, Reference Materials, and Tutorials for WPCode

Most Popular

Get free tips and resources right in your inbox, along with 500+ others

Follow Us

Setting Up Conversion Pixels

Would you like your ad platforms to see the visits and sales your WordPress site brings in?

In this guide, we’ll walk you through adding your Facebook, Google, Pinterest, TikTok, and Snapchat pixels with the WPCode Conversion Pixels addon. All you need is WPCode and the ID from each ad account you want to connect.

Requirements: The Conversion Pixels addon is available on a plus license level or higher.

Before you get started, make sure WPCode is installed and activated on your WordPress site.

Activating the Conversion Pixels Addon

To get started, we’ll open the Conversion Pixels screen, where the settings for each ad platform live on their own tab.

From your WordPress admin sidebar, go to Code Snippets » Conversion Pixels.

The Code Snippets menu with Conversion Pixels selected, beside the Conversion Pixels screen showing the Facebook tab and its empty Facebook Pixel ID field

If the addon isn’t set up yet, the screen asks you to add it first. In that case, click Install Addon Now. If the addon is already installed but not activated, click Activate Addon instead.

A message reading The Conversion Pixels Addon is not active, with an arrow pointing at the Activate Addon button

Once the addon is active, this screen shows the pixel settings for each platform.

Adding Your Facebook Pixel

The screen opens on the Facebook tab. It holds your pixel’s details at the top and the events WPCode sends below them.

The Facebook Pixel section with empty Facebook Pixel ID and Conversions API Token fields

In the Facebook Pixel ID field, paste the ID of your pixel. If you’re not sure where to find it, see our guide on finding your Facebook Pixel ID and Conversions API token.

An arrow pointing at the Facebook Pixel ID field, filled in with a pixel ID

If you have a Conversions API token, paste it into the optional Conversions API Token field. With a token in place, WPCode sends add to cart, checkout, and purchase events from your server instead of the visitor’s browser. Server events are more reliable than browser events and can improve audience targeting.

An arrow pointing at the Conversions API Token field, filled in with a token, above the Facebook Pixel Events setting

Under Facebook Pixel Events, the Page View Event toggle records every page a visitor opens. WPCode switches it on for you, so your pixel starts counting visits as soon as you save. It works on any site, with or without a store. If you switch it off, Facebook stops receiving page view events from your site.

An arrow pointing at the Page View Event toggle, switched on, above the eCommerce Events Tracking section

The eCommerce Events Tracking section covers shopping activity: product views, add to cart, checkout, and purchases. WPCode looks for WooCommerce, Easy Digital Downloads, and MemberPress on your site. When it finds one, these events start tracking your store’s activity.

Without a store plugin, the section reads Disabled, no eCommerce Platform Detected, with its toggles greyed out. That’s expected. Your page view tracking still works.

The eCommerce Events Tracking section reading Disabled, no eCommerce Platform Detected, with greyed-out ViewContent, AddtoCart, InitiateCheckout, and Purchase event toggles

Each tab saves on its own. Before you move to another platform, click Save Changes at the bottom of the tab.

An arrow pointing at the Save Changes button below the Purchase Event toggle

WPCode confirms the save with a Settings updated message. Your Facebook pixel now loads on every page of your site.

Adding Google Analytics and Google Ads

One tab covers both Google Analytics and Google Ads. You can fill in either or both. Next, click the Google tab.

An arrow pointing at the Google tab, which opens the Google Analytics and Ads Tracking section with an empty Google Analytics ID field

To track visits in Google Analytics, paste your measurement ID into the Google Analytics ID field. It starts with G-. Our guide on finding your Google Analytics ID shows where to copy it.

An arrow pointing at the Google Analytics ID field, filled in with an ID starting with G-

To track sales from your Google Ads campaigns, fill in the Google Ads Tag ID, which starts with AW-. Then add the Ads Conversion Label for the conversion you want to count. Our guide on finding your Google Ads tag ID and conversion label covers both.

An arrow pointing at the Google Ads Tag ID field, filled in with an ID starting with AW-, above a filled-in Ads Conversion Label field

WPCode reports that conversion, with the order’s value, when a customer reaches your store’s order confirmation page.

Below the IDs, the tab has the same Page View Event toggle and eCommerce events as Facebook. It also adds a Conversion Event toggle for your Ads label. When you’re done, click Save Changes at the bottom of the tab.

An arrow pointing at the Save Changes button below the Conversion Event toggle on the Google tab

Your Google tracking now loads on every page of your site.

Adding Your Pinterest Tag

Pinterest calls its pixel a tag. To add yours, click the Pinterest tab.

An arrow pointing at the Pinterest tab, which opens the Pinterest Tag section with an empty Tag ID field

Paste your tag’s ID into the Tag ID field. Pinterest records page visits as soon as the tag loads. That’s why there’s no separate page view toggle on this tab.

For server-side events, also fill in the Ad Account ID and the Conversion Access Token. Pinterest needs both before WPCode can send events from your server. Our guide on finding your Pinterest tag ID and conversion access token shows where to copy each one.

An arrow pointing at the Pinterest Tag ID field, with the Ad Account ID and Conversion Access Token fields filled in below it

Below these fields, the eCommerce events work the same way as on the Facebook tab. When you’re finished, click Save Changes at the bottom of the tab.

An arrow pointing at the Save Changes button below the Checkout Event toggle on the Pinterest tab

Your Pinterest tag now loads on every page of your site.

Adding Your TikTok Pixel

The TikTok tab follows the same pattern. Next, click the TikTok tab to open it.

An arrow pointing at the TikTok tab, which opens the TikTok Pixel section with an empty Pixel ID field

Paste your pixel’s ID into the Pixel ID field. The Events API Access Token is optional and sends add to cart, checkout, and purchase events from your server.

Like Pinterest, TikTok records page views automatically once the pixel loads. To find both values, see our guide on finding your TikTok pixel ID and Events API access token.

An arrow pointing at the TikTok Pixel ID field, with the Events API Access Token field filled in below it

TikTok’s eCommerce event toggles sit below these fields. When you’re done, click Save Changes at the bottom of the tab.

An arrow pointing at the Save Changes button below the PlaceAnOrder Event toggle on the TikTok tab

Your TikTok pixel now loads on every page of your site.

Adding Your Snapchat Pixel

Snapchat’s pixel takes one extra step compared with the other platforms, because its events start switched off.

To add your Snapchat pixel, click the Snapchat tab.

An arrow pointing at the Snapchat tab, which opens the Snapchat Pixel section with an empty Snap Pixel ID field

Paste your pixel’s ID into the Snap Pixel ID field. The Conversions API Token is optional and works the same way as Facebook’s. Our guide on finding your Snapchat pixel ID and Conversions API token shows where to copy them.

An arrow pointing at the Snap Pixel ID field, filled in, with the Conversions API Token field filled in below it

Under Snapchat Pixel Events, switch on the page view toggle so the pixel records each page a visitor opens. Until you switch it on, the Snapchat pixel doesn’t record page views.

An arrow pointing at the page view toggle under Snapchat Pixel Events, switched on, above the eCommerce Events Tracking section

If you run a store, switch on the eCommerce events you want as well. Then click Save Changes at the bottom of the tab.

An arrow pointing at the Save Changes button below the Purchase Event toggle on the Snapchat tab

That’s it! Your ad platforms can now see the visits and sales your site brings in. Next, take a look at our guide on custom click tracking to report a conversion when a visitor clicks a specific button.

Frequently Asked Questions

Below, we’ve answered some of the most common questions about setting up conversion pixels in WPCode.

Do I need an online store to use conversion pixels?

No. Page view tracking works on any WordPress site. The eCommerce events become available when WPCode finds WooCommerce, Easy Digital Downloads, or MemberPress. WPCode detects these plugins on its own, so there’s nothing extra to connect.

Where does WPCode add the pixel code?

WPCode adds each pixel to the header of every page on your site. A platform whose ID field is empty adds nothing. You only load the pixels you’ve filled in.

What changes when I add a Conversions API token?

WPCode sends add to cart, checkout, and purchase events straight from your server to that platform. For Facebook, TikTok, and Snapchat, it then skips the browser copy of those events. That way, each one is only counted once. Page views always come from the visitor’s browser.

Does saving one tab save my other pixels too?

No. Each tab has its own Save Changes button. It only saves the tab you’re on. To keep every pixel, save each platform before you switch to the next one.

Do pixel changes wait for Testing Mode?

No. Changes on the Conversion Pixels screen go live as soon as you save, even while Testing Mode is on. WPCode shows a note about this on the Conversion Pixels screen while Testing Mode is enabled.

Still stuck? How can we help?

Last Updated on

Get Started Today & Add Your Own Snippets

Future-proof your website with WPCode Snippets and improve the way you manage code across all your websites.