How to track Facebook Pixel events on WooCommerce with PixelYourSite plugin

Take a look at this video on how to manage the FB Pixel for your WooCommerce site with PixelYourSite PRO

 

*If you’re running a Woocommerce website and you want to optimize it for Facebook campaigns, this plugin will help you insert the Facebook pixel code and automatically track standard events

Important: The “Purchase” event will work only if the user is redirected to the Woocommerce Thank You page after the sale is completed. If you are using PayPal as your payment solution you must have Auto-Return activated. Here it is a guide about how to configure Paypal

Important: For the WooCommerce settings to work you must first add the Pixel ID and activate plugin’s general settings. Here is a guide about how to do it

If you’re using the PRO version please deactivate the FREE version of the plugin

How to Enable Facebook Pixel on WooCommerce

If you have WooCommerce active on your site, once you enable PixelYourSite plugin (first tab) it will automatically activate WooCommerce default settings. 

We recommend that you open WooCommerce tab and review the default settings, to see if they fit your particular situation.

If you want to disable WooCommerce events, scroll down up to the “Activate WooCommerce Pixel Settings”, uncheck the box and Save Settings.

activate-woo

Down on this page, we are going to explain what each option does and how can be used for better ads performance.

Facebook Dynamic Product Ads Pixel Settings

Free and Pro Option

It activates all the default events and pulls content_ids and content_type, the necessary  parameters for FB Dynamic Ads to run.

  • ViewContent Event on Product Pages
  • AddToCart Event on add to cart button click
  • AddToCart Event on Cart Page
  • InitiateCheckout Event on Checkout Page – is not mandatory for Dynamic Ads
  • Purchase Event on the Default WooCommerce Thank You Page

woo-dynamic

Options:

Content ID: You can select what value will be used for the content_ids parameter. The default is ID, but you can also select product SKY. In this case, you must have SKU for all your products. This has to be identical to the option that you have for the products IDs in your Product Catalog.

Define Variation ID: If you have variable products, then there are 2 options

  • Use Main Product Data –  in this case, the ID used for each variation is the ID of the main product. It means that AddToCart, InitiateCheckout, and Purchase events will use the ID of the main product, ignoring the variation ID.
  • Use Variation Data – in this case the plugin will use the variation ID for AddToCart, InitiateCheckout, and Purchase events.

The default setting is Main Product Data.

Note: The Content ID option will be respected (ID or SKU)

Product Catalog Feed With Just a Few Clicks

When starting with Facebook Dynamic Ads you have to create a Product Catalog Feed for your WooCommerce site. 

Because some users are scared of this step, we made a dedicated plugin that helps you to generate the feed with just a few click: You can Click Here to Download The Product Catalog Feed Plugin for a Discount.

Custom Audience Optimization

Pro Option – click to update

This option adds important parameters for each WooCommerce event, like content_name, content_category. Those parameters are very useful in creating highly targeted Custom Audiences  that will help you boost your ads profitability.

Tracking Product Tags: product tags will be tracked for the WooCommerce events. If an event is related to multiple products (a Purchase event with a number of products, for example), all products tags will be tracked.

We highly recommend using them in conjunction with the General Event option. Because using Custom Audiences and Lookalike Audiences is important, we made a dedicated GUIDE that you can download directly from  the plugin admin page. Don’t miss it!

custom-audiences-wooTax Options

Pro Option – click to update

This is a global option for all the WooCommerce events, and you can decide whether the value will include tax or not.

woo-tax

ViewContent Event

ViewContent is added on Product Pages and it is required for Facebook Dynamic Product Ads.

You can disable this event if you want, but we highly recommend to keep it ON.

IMPORTANT: Not to be confused with the event added by the General Event Option. This event can also be named ViewContent, but is not active on single product pages and is never used for Dynamic Ads.

Delay the ViewContent Event

Pro Option – click to update

If you don’t want to retarget bouncing users, you can delay the ViewContent event. Simply add the desired time in seconds in the dedicated field:

delay-woo-view-ev

TIP: It is better to add a lower time that the desired one because the pixel code will not load instantaneously. The loading time will vary depending on the internet speed, browser, computer and so on, but you better take that into consideration. For a desired 20 seconds delay you can add something like 15-18 seconds.

ViewContent Value

Pro Option – click to update

This option ads Value and Currency to the ViewContent Event and is important for correct ads performance tracking.

There are 3 distinct ways you can pull value:

  1. Product Price –  the product price will be used
  2. Percent of Product Price – a percent of the product price will be used
  3. Global Value – it will be used regardless of the product price

Best Value Strategy for ViewContent Event

Deciding on the best strategy for the ViewContent Event value can be tricky.

Using the Product Price will clearly gave you some incorrect values, because not everyone landing on a product page is going to buy that product. If you use this strategy, you must always remember this when analyzing the ads performance.

The most logical solution would be to use a percent of the price.

If you have Google Analytics Ecommerce enable for your site (and you should), open it and then select a relevant time frame of at  at least a month, then go on Conversions > Product Performance.

The last column of the report is called Buy-To-Detail Report and it shows Unique purchases divided by views of product-detail pages:

google-report

You should use this percent for the ViewContent Value, because it will give you closer to reality reports for this event.

AddToCart Event

AddToCart event will be added on add to cart button click and on cart page. It is required for Facebook Dynamic Product Ads.

In some cases it makes sens to disable the event from the cart page, but this is up to you.

AddToCart Value

Pro Option – click to update

This option ads Value and Currency to the AddToCart Event and is important for correct ads performance tracking.

There are 3 distinct ways you can pull value:

  1. Product Price –  the product price will be used
  2. Percent of Product Price – a percent of the product price will be used
  3. Global Value – it will be used regardless of the product price

Best Value Strategy for the AddToCart Event

Go to Conversion > Shopping Analysis > Shopping Behavior and look for the Sessions With Add to Cart column. You will see the percent of users who complete the transaction (on a Grey arrow) and the Cart Abandonment percent.

Use the first one as the Value Percent for this event.

InitiateCheckout Event

InitiateCheckout event will be enabled on the Checkout page. It is not mandatory for Facebook Dynamic Product Ads, but it is better to keep it on.

InitiateChekout Value

Pro Option – click to update

This option ads Value and Currency to the InitiateCheckout Event and is important for correct ads performance tracking.

There are 3 distinct ways you can pull value:

  1. Product Price –  the product price will be used
  2. Percent of Product Price – a percent of the product price will be used
  3. Global Value – it will be used regardless of the product price

Best Value Strategy for InitiateCheckout Event

Once again, Google Analytics can prove to be really helpful.

Go to Conversion > Shopping Analysis > Checkout Behavior and look for Sessions with Transactions data. This is the percent of people that arrive on the Checkout Page and complete the transaction.

You can use it to define the percent of price for this event value.

Purchase Event

Purchase event will be enabled on the Thank You page. It is mandatory for Facebook Dynamic Product Ads.

This is the most important event and we strongly recommend you to keep it always ON.

Important: The event only works on the default WooCommerce Thank You page (order-received)

You can use it for:

  • Ads optimization – Select Increase Conversion on Your Website as objective, then select the Purchase Event as your objective
  • Conversion Tracking
  • Custom and Lookalike Audiences

Improved Purchase Event – Pro Version

The pro version of the plugin dramatically improves the Purchase event on a WooCommerce website:

Purchase Value

Pro Option – click to update

This option adds Value and Currency to the Purchase Event and is very important for correct ads performance tracking.

Transport – you can decide whether the shipping cost will be included or excluded from the event value.

After this, there are 3 distinct ways you can pull value:

  1. Total –  the transaction Total value will be used
  2. Percent of Total– a percent of the transaction Total will be used
  3. Global Value – it will be used regardless of the transaction value

Best Value Strategy for The Purchase Event

Once you have decided upon tax inclusion or exclusion, we recommend you to use the Total value of the transaction. At this point, the user have bought the products, and you know for sure what  is the value for this particular conversion.

Advanced Matching

Pro Option – click to update

This is a new feature from Facebook, and according to their own experiments and tests, it results in over 10% increase in attributed conversions and 20% increase in reach of retargeting campaigns.

The problem it solves: Some of the users and clients on your website are not logged into their Facebook accounts. Because of this, Facebook skips them completely when it creates Custom Audiences or Retargeting Campaigns (Dynamic Ads included).

This new feature sends the data that you have about the client (like name, email, phone, city, ZIP) and lets Facebook identify the user correctly.

Purchase Event Advanced Matching – once a transaction is completed, the client data will be used for Advanced Matching. This is how the code will look like:

fbq(‘init’, ‘xxxxxxxxxxxxxxxx’ , { email: ‘JohnSnow@ilovechristmas.com’, phone: ‘1234567890’, fn: ‘John’, ln: ‘Snow’, ct: ‘Castle Black’, st: ‘Winterfell’, zip: ‘321winteriscoming’, country: ‘KN’ } );

Read more about Advance Matching

Custom Audience Optimization for the Purchase Event

Pro Option – click to update

Creating Custom Audiences and Lookalike Audiences based on the WooCommerce Purchase event is a key element of Facebook Ads campaign success, and because of that, we’ve added a few very useful features.

Add Town, State and Country Parameters – the name is pretty explanatory. It will add this data as Purchase parameters that you can select when creating Custom Audiences

Add Payment Method Parameters – You can use payment parameter for Custom Audiences

Add Shipping Method Parameters – You can use shipping parameter for Custom Audiences

Add Coupons Parameters – It will add 2 distinct parameters: coupon_used (yes or no) and coupon_name

TIP: Using these parameters for audience segmentation can be a great strategy. You can create an audience of clients who didn’t use a coupon on your website in the last 30 days and target them with an ad offering one, for example. Or you can offer a coupon with your ad and exclude the clients that have already use it.

Like for the rest of the events, the pro version will also track product name, product category and tag, traffic source and URL parameters.

Additional WooCommerce Events

The follow events are useful and were added as a result of requests from our users. They are OFF by default and you have to manually activate them if are useful for your campaigns.

WooCommerce Affiliate Products Events

You can add an event that will trigger each time an affiliate WooCommerce product button is clicked.

By default this is a Lead event, but you can select a different event type, or give it any name you want. In this case it will be a Custom Event, and you will not be able to optimize your ads for it. It will only be useful for Custom Audiences.

There are 3 options for this event value:

  1. don’t pull value
  2. value = product price
  3. global value

PayPal Standard Event

You can add an event that will trigger on PayPal Standard button click.

By default this is a InitiatePayment event, but you can select a different event type, or give it any name you want. In this case it will be a Custom Event, and you will not be able to optimize your ads for it. It will only be useful for Custom Audiences.

There are 3 options for this event value:

  1. don’t pull value
  2. value = product price
  3. global value

Pixel Error

When testing the events with Pixel Helper it is possible to see an error saying something like “Facebook Pixel can’t match products” (here is an article about Pixel Helper)

This means:

  1. You don’t have a Product Catalog uploaded
  2. You have a Product Catalog, but the product ID is not in it. In this case, make sure you are using the same rule for content_ids (ID or SKU)

If you are not doing Dynamic Ads, then you can ignore this error.

Why do you need a Product Catalog?

You need a Product Catalog if you are doing Facebook Dynamic Ads. We strongly recommend you to try Dynamic Ads, because they are highly efficient and run on auto-pilot.

Without dedicated Product Catalog Feed Plugin you can create 100% FB Dynamic Ads Feeds with just a few clicks: You can Click Here to Download The Product Catalog Feed Plugin for a Discount.

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match