{"id":4650,"date":"2016-10-27T14:00:01","date_gmt":"2016-10-27T11:00:01","guid":{"rendered":"https:\/\/www.reliablesoft.net\/?p=4650"},"modified":"2021-12-09T19:35:26","modified_gmt":"2021-12-09T17:35:26","slug":"how-to-setup-facebook-conversion-tracking-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.reliablesoft.net\/how-to-setup-facebook-conversion-tracking-in-wordpress\/","title":{"rendered":"How to Setup Facebook Conversion Tracking in WordPress"},"content":{"rendered":"

A necessary step before starting your Facebook Campaigns is to make sure that you have conversion tracking setup correctly.<\/p>\n

Being able to measure conversions coming\u00a0from Facebook visitors (after clicking on your ads), will help you optimize your campaigns and generate a higher ROI from every dollar you spend advertising in the biggest social network.<\/p>\n

Before getting your hands dirty, you should understand the different types of conversions available on Facebook and how to use them.<\/p>\n

The\u00a0Different Types Of Facebook Conversions<\/h2>\n

As of June 2016 Facebook has simplified the way they handle conversions and this makes it easier to implement.<\/p>\n

Basically there are two types of conversions: standard events and custom conversions.<\/p>\n

Standard events<\/strong> are based on predefined events (for example, add to cart, purchase etc.) while custom conversions<\/strong> are more flexible and can be configured directly from Facebook Ads Manager without having to mess up with the pixel code installed on your website.<\/p>\n

The first step before configuring either standard or custom conversions, is to install the Facebook pixel on your website<\/strong><\/a>.<\/p>\n

Once you add the FB Pixel code on all your website pages, including those that are shown to the user after a conversion is made (for example, your \u2018Thank you\u2019 pages), you can start configuring your conversions.<\/p>\n

Facebook Standard Events VS Custom Conversions<\/strong><\/p>\n

Both types can help you optimize your Facebook campaigns based on the actions users perform on your website. They have the following differences:<\/p>\n

Custom Conversions<\/strong> are easier to set up since they don\u2019t require any changes to the pixel code but they cannot be used with advanced campaign types like Dynamic Ads.<\/p>\n

Standard events<\/strong> are more powerful and have more options but they require making changes to the Facebook pixel that is loaded in specific pages of your website.<\/p>\n

Here is a table that explains all the differences between standard events and custom conversions.<\/p>\n

\"facebook<\/p>\n

How to Setup Facebook Standard Events on WordPress<\/h2>\n

Facebook has created a number of predefined events that can be added to the Pixel code, depending on the actions performed by the user i.e. viewing a particular page or performing a specific action i.e. completed the checkout process.<\/p>\n

The default event that comes with the FB Pixel is \u201cPageView\u201d. As the name implies, it is triggered when a page is viewed and this information is passed back to Facebook.<\/p>\n

The complete list of available events is shown below:<\/p>\n

\"Facebook<\/p>\n

How to use Standard Events<\/strong><\/p>\n

Standard events are an addition to the FB Pixel Code. This means that on the page you want to add a standard event, the FB pixel code should already be present.<\/p>\n

Let\u2019s see a real example to understand how this works:<\/strong><\/p>\n

Assume that you have a \u2018Contact Us\u2019 form and upon submission you show users a \u2018Thank You\u2019 Page. From a business perspective, you consider this action to be a \u2018Lead\u2019.<\/p>\n

On the \u2018Thank You\u2019 page, you already have the FB Pixel loaded to the HEAD of the page which by default tracks \u2018page views\u2019.<\/p>\n

In order to track the form submissions and consider them as LEADS in FB, you also need to add the following code to the \u2018Thank You\u2019 \u00a0page, after the FB pixel is loaded:<\/p>\n

<script><\/em><\/p>\n

fbq(‘track’, ‘Lead’);<\/em><\/p>\n

<\/script><\/em><\/p>\n

The easiest way to do this in WordPress is to make use of the AddFunc Head & Footer Code<\/strong><\/a> plugin which allows you to add JavaScript code to specific pages.<\/p>\n

Your code on the \u2018Thank You\u2019 page, should look like this:<\/p>\n

\"Facebook<\/p>\n

You can use the above example as a guide and add the necessary event code to the pages of your website that play a role in conversions. For example, if you are running an ecommerce website, you can tag your:<\/p>\n