The Facebook pixel is an analytics tool that allows you to measure the effectiveness of your advertising by understanding the actions people take on your website.
Conversions API is a Facebook Business Tool that lets you share key web and offline events, or customer actions, directly from your server to Facebook’s. Conversions API works with your Facebook pixel to help improve the performance and measurement of your Facebook ad campaigns.
To get started, follow along with the steps laid out below.
Log into Facebook
Navigate to your Ads Manager
Navigate to: Business Manager > Business Settings > Brand Safety > Domains (left menu) Or click on the prompt to verify your domains if there is one.
Confirm your domain is verified:
If your domain is already verified, it will appear in the main window with a green dot. If you started to verify a domain but did not complete the process, your domain name will appear with a red dot. Otherwise, you will see a message that you have no verified domains.
Click Add and type in your domain name, then click Add Domain.
You can verify your domain using one of three methods:
DNS Verification, HTML File Upload, or Meta-Tag.
Follow the instructions for the method you choose to use. On successful verification, your domain name will show a green dot.
Setup Facebook Pixel ID
Facebook instructions for this can be found here.
Go to the Facebook Events Manager
Click the green plus Connect Data Sources and select Web
Select Facebook Pixel and click on Connect
Name your pixel
Enter your domain name/url and check for setup options
Once your pixel is created you can select Install code manually or use one of the partner integrations to install the pixel for your site. If you choose a partner integration, such as for WordPress, simply follow the instructions on the screen. Alternately, copy the Pixel ID and save it for when you set up the Conversions API below.
Setup Conversions API
Next, we will set up the Conversions API using WordPress. If you are using WooCommerce there is a partner integration for the Conversions API already. You can simply choose that option and begin set up.
If you are not running WooCommerce, you can use the WordPress partner integration or PixelYourSite.
To set up PixelYourSite, you will need to install the plugin in your WordPress admin.
Log in to WordPress.
Select Plugins from the left-hand menu.
Click Add New
Search for PixelYourSite
Click install now on the PixelYourSite plugin
Click Activate once the plugin is installed
Once the plugin is activated, it will appear in the left-hand menu.
Select the plugin and you will be taken to the plugin’s Settings page.
In a new window, go into Facebook Events Manager and copy your Pixel ID.
Return to the plugin settings page and paste the Id into the Facebook Pixel ID box.
Return to the Facebook Events Manager.
Select Settings. Scroll down to Conversions API and click on Generate Access Token.
Copy the generated token
Paste the copied token into the API Token field inside the plugin settings page.
Inside Facebook Events Manager once more, navigate to the Test Events tab. Copy the test code located in Test Server Events.
In the PixelYourSite settings page, paste the test code into the test_event_code: box, scroll to the bottom of the page and select Save Settings.
Now you can navigate to your site and click around. If everything is set up correctly, you should see events being logged in the Test Events tab in Events Manager for Facebook.
Once you verify everything is correctly setup, return to the PixelYourSite settings, delete the test_event_code, and save your settings once more.
Facebook WordPress Partner Integration setup
Alternatively, you can use the Facebook partner integration for WordPress.
Go to Facebook Events Manager and click on the Settings tab. Scroll to where it says Conversions API and click Choose a Partner.
Select WordPress and on the next page check both boxes and click on Create Access Token
Copy the access token that was generated and paste it somewhere safe. You will use this later.
Click Download to get the Facebook WordPress Pixel plugin/extension.
Log in to your WordPress admin and navigate to Plugins and select Add New from the left-hand menu.
Choose upload plugin and select the file you downloaded from the Facebook Events Manager.
Click Install Now.
Once installed, click Activate Plugin.
Return to the Events Manager and copy your pixel ID. Back in the WordPress admin, paste this in the Pixel ID field in the plugin settings.
Check both boxes below this and then paste the access code you saved earlier into the Access Token box.
Save your settings changes.
Return to Facebook Events Manager and select the Overview tab. If everything is working correctly, you should see events labeled active with a green dot, You may need to open your site and navigate around for a few minutes before events start to show up here.
Inside of the Events Manager, you can set up events inside of Settings. Open Event Setup Tool. You can then generate the events you would like to track for your website.