single php
Homepage Menu dark
 

Facebook Conversion API (CAPI) for WooCommerce and how to set up

April 14, 2021   |
   Raja Rajan

In the history of evolution especially in technology, every update creates turbulence before we analyze what and why exactly has it occurred. And one such turbulence that made the marketers run from pillar to post is the iOS’14 privacy update announcement.

If you’re one of the marketers looking to run ad campaigns effectively and optimize better and take your business to the other level, all that you need to do is – hang on with us for another few minutes and you will know why. However, did you know that Facebook API Conversion helps and works better for your business?

  1. What is Facebook Conversion API
  2. The impact of iOS’14 on WooCommerce
  3. Why is Facebook Conversion API gaining importance now?
  4. How to set up conversion API for WooCommerce without relying on developers help
  5. Benefits of Facebook Conversion API

What is Facebook Conversion API?

Facebook Conversion API (FB CAPI) primarily evolved from server-side API lets advertisers send web events from their servers to the Facebook server. CAPI data flows into Facebook and is treated just like pixel events allowing advertisers to measure, track and optimize their conversions.

Facebook Conversion API (CAPI) for WooCommerce and how to implement it

The impact of iOS’14 on WooCommerce

Apple users are given the freedom of choice for users to opt-in for apps tracking which will impact the WooCommerce stores and also other e-commerce small-medium businesses that rely on Facebook ads to run their business.

As a marketer, if you’re running Facebook ads, it is important to track your data to measure the performance of ad campaigns

Only if you can measure the performance of ad campaigns, you can optimize & improve conversions and increase revenue further.

With browsers blocking third-party cookie tracking and with the latest announcement on the iOS’14 update, Apple has given the freedom of choice for users to opt-in/ opt-out from apps tracking. Many advertisers anticipate that a huge number of users will opt out of app tracking. In absence of the app-tracking information, it’s going to be hard for advertisers to track the data and measure the performance of their ad campaigns.

Apple has stated that with their App Tracking Transparency policy (ATT)

Why is Facebook Conversion API gaining importance now

As of 2020, Facebook is the largest social media platform globally with 2.6 billion active users worldwide and India is the top first among the world countries and followed by the United States. Similarly, there are around 1.65 billion active iOS users as per Tim Cook’s recent update, with the US ranking on top followed by China and Europe having the greater market for Apple.

WooCommerce is one of the popular e-commerce platforms that has around 3.8 million stores, it’s a no-brainer that WooCommerce store owners run ads on Facebook and their customers would probably be using Apple iPhones as well and they are going to be affected by these updates well.

And the solution is to implement Facebook Conversion API for their WooCommerce store.

Here are the steps to setup WooCommerce event tracking and send your event data to Facebook via Facebook Conversion API

Step 1: Getting Started

Step 2: Account Setup

Setting up an account with CustomerLabs CDP is very easy, it just takes you few seconds

Step 3: Tracking Code 

On clicking tracking code. You will get a unique code, simply paste that code into your WooCommerce store

To do that go to admin panel of your WordPress, Appearance>Editor>Your website code appears here. Paste your unique code under the <head tag> and click on save. Enter your store’s URL in Action recorder and click on verify code.

You will get this message, once your account is verified. 

Step 4: Setup tracking in your WooCommerce store

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. WooCommerce “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 WooCommerce 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 WooCommerce Add to cart event is now set with CustomerLabs CDP.

2. WooCommerce 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,

Click on pointing symbol manually and select the product name. As it is done below.

For this, I want to track WooCommerce 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 WooCommerce checkout made the event is now set with CustomerLabs CDP

3. WooCommerce empty cart

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 WooCommerce store. 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 WooCommerce abandoned cart event is now set with CustomerLabs CDP

4. WooCommerce Search Made

To record searches made on your WooCommerce store, 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 WooCommerce store, choose all pages.

Click on save, once you are done. WooCommerce product search event is now set with CustomerLabs CDP.

Step 5: Test Action Recorder 

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 WooCommerce store in the new window and click on the events which you just set for tracking.

Case 1: Add To Cart

On clicking “Add to cart” on any of your products in your WooCommerce store, you will get the live data of the specific product which is been sent to cart. As shown below

Case 2: Removed From Cart

On clicking “remove from cart” on any of your products in your WooCommerce store, you will get the live data of the specific product which is been removed from the cart.

Case 3: Checkout Made

On clicking checkout on any of your products in your WooCommerce store, 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 WooCommerce store, you will get the live data of the specific product that is been sent to checkout.

Case 4: Search Made

On searching something in your WooCommerce store’s search bar, you will get the exact search term that is been typed. As it is shown below,

Steps to integrate your WooCommerce store (website) with Facebook through Facebook Conversion API

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.

Creating events on the WooCommerce store using a no-code event tracker:

We use our no-code event tracker to track the events on the Shopify store 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.

Mapping the Facebook fields to improve Event Quality:

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

Switching off client-side and on server-side

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

Customizing Facebook event data to show personalised Ads

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.

Important concepts to improve match rate

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 Event Data

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.

 
CustomerLabs gives freedom, flexibility and wings to digital marketers.
CREATE A FREE ACCOUNT
© 2021, Customer Labs Inc. All rights reserved.