Documentation, Reference Materials, and Tutorials for WPCode
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.
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.
![]()
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.
![]()
Once the addon is active, this screen shows the pixel settings for each platform.
The screen opens on the Facebook tab. It holds your pixel’s details at the top and the events WPCode sends below them.
![]()
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.
![]()
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.
![]()
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.
![]()
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.
![]()
Each tab saves on its own. Before you move to another platform, click Save Changes at the bottom of the tab.
![]()
WPCode confirms the save with a Settings updated message. Your Facebook pixel now loads on every page of your site.
One tab covers both Google Analytics and Google Ads. You can fill in either or both. Next, click the Google tab.
![]()
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.
![]()
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.
![]()
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.
![]()
Your Google tracking now loads on every page of your site.
Pinterest calls its pixel a tag. To add yours, click the Pinterest tab.
![]()
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.
![]()
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.
![]()
Your Pinterest tag now loads on every page of your site.
The TikTok tab follows the same pattern. Next, click the TikTok tab to open it.
![]()
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.
![]()
TikTok’s eCommerce event toggles sit below these fields. When you’re done, click Save Changes at the bottom of the tab.
![]()
Your TikTok pixel now loads on every page of your site.
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.
![]()
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.
![]()
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.
![]()
If you run a store, switch on the eCommerce events you want as well. Then click Save Changes at the bottom of the 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.
Below, we’ve answered some of the most common questions about setting up conversion pixels in WPCode.
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.
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.
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.
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.
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.
Future-proof your website with WPCode Snippets and improve the way you manage code across all your websites.