How to implement Facebook Conversion API for WordPress
·
On July 6, 2021
·
Conversion API although a popular name among marketers now. It is formerly called server-side API that lets advertisers share website events directly with Facebook.
WordPress started out as a blogging platform in 2003 but soon transformed into a CMS and later a full-fledged website building platform.
There are around round 455,000,000 websites powered by WordPress right now and a large number of businesses and eCommerce stores use WordPress to run their business
With browsers blocking third-party cookies and iOS’14 update has made advertisers hard to track and measure their data. Apple released the iOS’14 update to enhance its user privacy to the next level which allows Apple users to opt-in or opt-out from tracking. It’s expected that most people will opt out and marketers will lose data. Without complete data, it is hard for marketers to measure and track their campaign performance.
Facebook has been recommending its advertisers to use Conversion API to mitigate the limitations of Pixel tracking due to iOS’14 update, Browser blocking cookies, etc.
By implementing Conversion API, WordPress sites can send data from their website to Facebook via Conversion API. This helps advertisers measure campaign performance effectively.
Facebook conversions API needs developers help to set up but with the help of customer labs CDP we can set it without developers help. Facebook conversion API can be implemented by writing several codes with the developers help, but customer labs CDP no code event tracker will track the events on the WordPress websites and send the data through the server side API or Facebook CAPI.
Here are the steps to setup WordPress event tracking and send your event data to Facebook via Facebook Conversion API
Setting up an account with CustomerLabs CDP is very easy, it just takes you few seconds
On clicking tracking code. You will get a unique code, simply paste that code into your WordPress store
On clicking tracking code. You will get a unique code, simply paste that code into your WordPress store
To do that go to admin panel of your WordPress store account, select system>configuration. And in the design tab, go to Miscellaneous Scripts text area under HTML head. Paste your CallTrackingMetrics tracking code and click save config. Finally, enter your store’s URL in Action recorder and click on verify code.
You will get this message, once your account is verified.
Now, you are all set to record your actions using CustomerLabs CDP. Here, I’m going to show you to record actions for the following events:
1.Add to cart
2.Checkout made
3.Removed from cart
4.Search made
1. WordPress “Add To Cart” event tracking
To track add to cart event, choose action name as “ADD TO CART”.
Click on pointing symbol manually and choose “Add to cart”, as it is done below
Next step is selecting your attribute. For this below example, I need the name and price of the specific product which is been sent to cart, choose accordingly.
For this, I want to track Add to cart button in WordPress store for all the products. So that I could get the name and price of the specific product that has been sent to cart.
Click on save, Once you are done. The WordPress Add to cart event is now set with CustomerLabs CDP.
2. WordPress Checkout Made,
To track checkouts, click on “CHECKOUT MADE” as the Action name.
Click on pointing symbol manually and select “check out”, as it is done below
Next step is selecting the attribute. For this below example, I need specific product’s name which is been sent to “check out”, choose accordingly,
For this, I want to track WordPress checkout page event for all the products in my store. So that, I could get the name of the specific product that has been sent to checkout,
Click on save, Once you are done. The WordPress checkout made the event is now set with CustomerLabs CDP
To track items removed from cart choose “REMOVED FROM CART” as the action type
Click on pointing symbol manually and select “Remove” as shown below.
Next step is selecting the attribute. For this below example, I need specific product’s name which is been removed from the cart, choose accordingly from the cart,
Click on pointing symbol manually and select product name,
For this, I want to track “ Removed from cart” event for all the products in my WordPress. So that I could get the name of the specific product that has been removed from the cart, choose accordingly
Click on save, once you are done. The WordPress abandoned cart event is now set with CustomerLabs CDP
To record searches made on your WordPress, select action name as “search made”.
Choose action type as the pageview, Once you are done click on Add Details.
Next step is selecting the attribute. Choose URL Query, search string, and type q and click on verify. On clicking save, you can find your saved attributes as it is shown below:
Order to track searches throughout your WordPress, choose all pages.
Click on save, once you are done. Magento product search event is now set with CustomerLabs CDP.
The next step is to test your Action Recorder. Your Action names and Action types will differ based on what you chose previously.
In order to test this, if it is working open your WordPress in the new window and click on the events which you just set for tracking.
On clicking “Add to cart” on any of your products in your WordPress, you will get the live data of the specific product which is been sent to cart. As shown below
On clicking “remove from cart” on any of your products in your WordPress, you will get the live data of the specific product which is been removed from the cart.
On clicking checkout on any of your products in your WordPress, you will get the live data of the specific product that is been sent to checkout. On clicking checkout on any of your products in your WordPress, you will get the live data of the specific product that is been sent to checkout.
On searching something in your WordPress search bar, you will get the exact search term that is been typed. As it is shown below,
The browsers and ad blockers are blocking requests made by Facebook. And Facebook has started using aggregated event measurement to prioritize events fired by pixel from the website.
To overcome these challenges, the recommended way is to start sending the data through the server.
We use our no-code event tracker to track the events on the WordPress and send the events data through server-side API / Facebook Conversion API.
It simply takes few clicks to choose elements to track and capture data,
As soon as the event is configured, the event data will start firing to the Facebook pixel. However, if you’d like to send the data through server-side or Facebook Conversion API, you just have to toggle between the on and off switches.
In just a few steps you can enable Facebook on the destination part
👉Copy-paste your Facebook pixel id
👉 Authenticate Facebook and switch on the server-side send data.
Map the Facebook fields with the data collected. This data mapping helps Facebook match the audience data sent from the server and improves your event quality score
Finally, you should switch on the event you’d like to send from the server-side. Once you do that, Facebook pixel will start receiving the data via Conversion API score
If you want to customize event data for eg: variables and content IDs, you can open the code window and write a call back function that allows you to customize the event the way you want.
External ID:
CustomerLabs CDP assigns external IDs to all the visitors and collects IP address, FBC, FBP, user agent, parameters.
And when we send data to Facebook, we automatically add these IDs to the visitors’ data and this has improved our match rate for up to 4x (Our match rates are quite high of about 70 -95% when compared to the normal match rates of 15% – 3 0%)
The above process is automated, there’s no need to set up anything.
You can access the event data on Facebook with all the event, user & account attributes under parameters.
Facebook receives the data in real time, with all the attributes/parameters which can be used to create custom audience to engage them with personalized content.
CEO of CustomerLabs, Building next-generation tools for Digital Marketers. Moving ahead into the future of marketing, he realizes first-party data ops is necessary and is building technology to help marketers to make the experience with first-party data ops seamless! Being a founder and business leader, Vishnu talks about #cdp, #martech, #firstpartydata, #firstpartydataops, and #customerdataplatform
The latest news, perspectives, and insights from CustomerLabs
Unified data to boost ecommerce growth
Engage your customers across the funnel with a unified martech stack
Increase product metrics with a unified martech stack
Scale your customers quickly with the right data
Latest trends and best practices
Connect CDP with all your marketing tools
Events you don’t want to miss
See our client’s success stories
Events you don’t want to miss
Lorem ipsum dolor sit amet, consectetur
See all open positions
Unify martech stack
360° user view
Targeted User Segments
Targeted User Segments
Send data to marketing tools
Create offline conversion data on Google ads
Take control of your data with CAPI
Vishnu Vankayala
Founder
hari
Solutions Expert