1. Home
  2. Knowledge Base
  3. Facebook Tracking

Facebook Tracking

Facebook Tracking Settings

In order to start tracking events and reporting to Facebook, you need to setup several things under OptimizePress – Tracking.

Individual settings are explained below:

General Settings:

Enable Facebook Pixel across the whole site 

If this is set to ON, the Facebook Pixel set below, will be included across the whole WordPress site. Otherwise, it will only be present on OptimizePress enabled pages/posts/funnels/courses.

Bear in mind that if you use other Facebook tracking plugins and OptimizePress Pixel Tracking is enabled, this could lead to conflicts or double tracking.

Facebook Pixel ID 

If this is set, the tracking of events will start working and will start sending Browser Pixel Events that are turned on on the Facebook Events Settings screen (explained below).

By default, all events are turned on.

In order to get or create your Facebook Pixel, please go here. 

Enable Advanced Matching 

If this is set to on, OptimizePress will send additional data to Facebook (as available) like email, name and other data that is available at the time the Pixel event fires.

When this option is ON, the plugin will send Advanced Matching data for your logged-in visitors (or if we can identify that data in other means for non-logged-in visitors – for example, after someone optins or buys something through Checkout Form).

What is Advanced Matching: it’s a Facebook feature allowing you to securely send them info about your visitors. This info will help Facebook to identify (match) the visitor and make a connection with an actual Facebook account. This is useful for those instances when Facebook can’t do it by the usual means, like existing cookies or logged-in accounts.

The plugin will send information like:

  • Email
  • Phone
  • First Name
  • Last Name
  • City
  • State
  • ZIP
  • Country

Facebook Conversion API Settings

OptimizePress can send all the automatically triggered standard events directly to Facebook’s servers, bypassing the browser’s limitation, or ad-blockers.

This feature is called Conversion API and it was known initially as Server-Side Events.

Enable Facebook Conversion API 

If this is set to on, we will send events directly from your web server to Facebook through Conversion API. This will help you capture more events. In order for it to work properly, you need to set up a Conversion API access token, explained below.

Conversion API Access Token 

Find out how to Generate Facebook API Access Token. 

Here are steps as they were at this moment:

You can go directly to this link:

https://business.facebook.com/events_manager

Click on your pixel ID, and on the Settings link in the top menu.

Scroll down until you see the “Conversions API” section. Click on “Generate Access Token” and follow the steps.

When you set up everything, just copy and paste your Access Token here and Conversions API will start working.

Test Server Events via test_event_code 

To learn how to get tests_events_code Click here. 

If this settings is on and TEST EVENTS CODE is present in the field below, OptimizePress will send this code to Facebook and you will be able to see the data in the test events area on Facebook Tracking.

Test Events Code 

You need to enter your test_event_code from Facebook here. Bear in mind, this code changes periodically, so make sure to check that before testing.

IMPORTANT: REMOVE THE TEST_EVENTS_CODE after testing and going live!

What about double reporting?

As you may notice, OptimizePress will send both the browser and the server-side events. In this case, the server-side event acts like a backup for when the browser can’t work as expected.

In order to avoid double reporting, we sent a unique event_id parameter. Facebook uses it to de-double reporting transactions.

Attribution Model Settings

Attribution Model for Event Parameters 

Used for events parameters (landing page, traffic source, UTMs)

You can set First Visit (default) or Last Visit attribution model and their respective Cookie durations.

First visit attribution model will save the first visit data inside a cookie (valid for 7 days by default) and track that user through that cookie. So, if the user returns to your site in those 7 days, the parameters from his first visit will be sent to Facebook and the conversion will be attributed to the first visit parameters or ad.

Of course, any additional data will be sent as well, based on events triggered.

Last visit attribution model also saves a cookie, but this cookie is valid for only 1 minute. Which means, that if a user re-visits your site after 2 minutes, coming from another ad for example, the conversion will be attributed to that second ad and its parameters.

Facebook Tracking Events Settings

Here you can toggle events to be tracked and fired. All settings are self explanatory, basically you can turn on or off certain events.

Events and Data

In this section, we will explain which data is tracked and sent to Facebook.

Initial Data

On all events, some initial data is present that is required by Facebook and is always sent, regardless of which event is triggered.

Required data:

IP Address

Event ID – required for de-duplication
Event Source – usually a full URL when event occurred

Always Present Data:

landing_page – URL where event happened        

traffic_source – direct or referral

event_time 

event_day

event_month

event_day_in_month
any URL parameters that user brought in URL or in cookie

Always Present Data (if available)
Post_id
Post_title
Post_type
Event_url
On OptimizeFunnels pages:
Op_funnel_step_type 

Page View Event

This event can not be turned on in settings, so it always fires.

This event sends all the Standard data mentioned above and no additional data.

Lead Event

This event sends all the Standard data mentioned above and (if present and not empty):
Email
First Name
Last Name 

OptimizePress Lead Event Matching Explained

If Advanced Matching is on, we are sending additional data to Facebook, which we get from logged in users. If a user is not logged in, we can not know which additional data to send.

But, if a non-logged-in user enters his data in, for example Optin Form and Lead Event is triggered, that data is saved in cookie and is present from that point onward in all triggered events.

This is beneficial as Facebook can better match those users as they move through your site and you can even build Custom Audiences based on this data.

Purchase Event

This event sends all the Standard data mentioned above and (if present and not empty):
// user data

email

first_name

last_name

city

state

zip_code

phone

country_code: order.country

// custom data

content_name: product name

content_ids: product id

content_type: product type

value: product price,

currency

Complete Registration Event 

This event sends all the Standard data mentioned above and (if present and not empty):
Email

First Name

Last Name



Add To Cart, View Content and Add To Cart for Order Bump Events

This event sends all the Standard data mentioned above and (if present and not empty):

content_name: product name

content_ids: product id

content_type: product type

value: product price,

currency

Scroll Event

This event sends all the Standard data mentioned above and no additional data.

Updated on November 4, 2024

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
Contact Support