{"id":2155,"date":"2021-05-25T05:00:00","date_gmt":"2021-05-25T02:00:00","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?p=2155"},"modified":"2024-12-27T16:56:52","modified_gmt":"2024-12-27T14:56:52","slug":"add-facebook-pixel-wordpress","status":"publish","type":"post","link":"https:\/\/creativethemes.com\/blocksy\/blog\/add-facebook-pixel-wordpress\/","title":{"rendered":"How to Add Facebook Pixel to WordPress (Using Blocksy or Manually)"},"content":{"rendered":"\n<p>If you&#8217;re wondering how to add Facebook pixel to WordPress, you&#8217;re in the right place. In this straightforward tutorial, we explain what a Facebook pixel is, why you&#8217;d want to use it on your WordPress site, and how to set it up.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#what-is-the-facebook-pixel-and-why-use-it-\ud83d\udd38\">What Is the Facebook Pixel and Why Use It? \ud83d\udd38<\/a><\/li><li><a href=\"#how-to-create-your-facebook-pixel\">How to create your Facebook pixel<\/a><ul><li><a href=\"#how-to-create-a-facebook-pixel-when-advertising-through-a-personal-account\">How to create a Facebook pixel when advertising through a personal account<\/a><\/li><li><a href=\"#how-to-create-a-facebook-pixel-in-facebook-business\">How to create a Facebook pixel in Facebook Business<\/a><\/li><\/ul><\/li><li><a href=\"#how-to-add-facebook-pixel-to-word-press-using-the-blocksy-theme-\ud83d\udc4d\">How to add Facebook pixel to WordPress using the Blocksy theme \ud83d\udc4d<\/a><ul><li><a href=\"#activate-the-custom-code-snippets-extension\">Activate the Custom Code Snippets extension<\/a><\/li><li><a href=\"#option-a-add-the-facebook-pixel-to-the-entire-website\">Option a): Add the Facebook pixel to the entire website<\/a><\/li><li><a href=\"#option-b-add-the-facebook-pixel-to-select-pages-posts-only\">Option b): Add the Facebook pixel to select pages\/posts only<\/a><\/li><\/ul><\/li><li><a href=\"#how-to-add-facebook-pixel-to-word-press-manually\">How to add Facebook pixel to WordPress manually<\/a><\/li><li><a href=\"#specific-use-cases-for-facebook-pixel\">Specific Use Cases for Facebook Pixel<\/a><\/li><li><a href=\"#scenarios-where-not-using-facebook-pixel-could-hurt-your-campaigns\">Scenarios Where Not Using Facebook Pixel Could Hurt Your Campaigns<\/a><\/li><li><a href=\"#advantages-of-blocksys-custom-code-snippets-over-manual-methods\">Advantages of Blocksy\u2019s Custom Code Snippets Over Manual Methods<\/a><\/li><li><a href=\"#thats-it-\ud83c\udf7e\">That&#8217;s it! \ud83c\udf7e<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-facebook-pixel-and-why-use-it-\ud83d\udd38\">What Is the Facebook Pixel and Why Use It? \ud83d\udd38<\/h2>\n\n\n\n<p>Let me just read you a part of the official definition, since it&#8217;s actually quite good:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The Facebook pixel is a snippet of code that lets you track visitor activity on your website.<\/p>\n<\/blockquote>\n\n\n\n<p>Now, what sort of <em>activity<\/em> can you track?<\/p>\n\n\n\n<p>This is entirely up to you. You can track whatever activity is important to you. The most common usage is to track conversions or events that lead to sales or other visitor interactions.<\/p>\n\n\n\n<p>What basically happens is that the Facebook pixel works quietly in the background of your site, tracks all those events and the user actions that trigger them. Then, when the event happens, an information gets sent back to Facebook. You can then use that information as input points or feedback for your ad campaigns. It gives you insights about how your visitors interact with your site.<\/p>\n\n\n\n<p>In the end, what the Facebook pixel allows you to do is make a connection between your site and the ad campaigns that you have running on Facebook. This, for example, lets you target ads to only those visitors who have seen a particular page or product on your site. More details on <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/place-ads-wordpress-site\/\">how to place ads on a WordPress site<\/a> in our guide.<\/p>\n\n\n\n<p>These sort of things are great at recovering abandoned shopping carts or getting the person back to your site in any other circumstances.<\/p>\n\n\n\n<p>\ud83d\udca1 Just to emphasize this, you only need the Facebook pixel on your site if you&#8217;re going to be running any ad campaigns with the Facebook Ads platform. Scratch that, it&#8217;s not that you <em>need<\/em> the Facebook pixel then, you absolutely <em>must<\/em> get it for your site! It will give you a whole new level of tracking capabilities with your campaigns.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-create-your-facebook-pixel\">How to create your Facebook pixel<\/h2>\n\n\n\n<p>Before you can add the Facebook pixel to your site, you have to first create it within the business section of the Facebook interface.<\/p>\n\n\n\n<p>Depending on whether you&#8217;ve set your Facebook ad presence through your personal account or a business account, you&#8217;re going to use either the normal version of Facebook&#8217;s Events Manager or the Events Manager in Facebook Business.<\/p>\n\n\n\n<p><a href=\"https:\/\/business.facebook.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Facebook Business<\/a> is a more advanced area of Facebook, mainly meant for people working with multiple pages, ad accounts, and even client campaigns.<\/p>\n\n\n\n<p>One want to create a custom test page and test the pixel there. Look for our <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/upload-html-wordpress\/\">guide to uploading HTML in WordPress<\/a> if so!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-to-create-a-facebook-pixel-when-advertising-through-a-personal-account\">How to create a Facebook pixel when advertising through a personal account<\/h3>\n\n\n\n<p>To start, go to the <a href=\"https:\/\/www.facebook.com\/events_manager2\" rel=\"nofollow noopener\" target=\"_blank\">Events Manager<\/a>.<\/p>\n\n\n\n<p>Click on the <strong>+ Connect Data Sources <\/strong>button and select <strong>Web<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1686\" height=\"521\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources.png\" alt=\"connect data sources\" class=\"wp-image-2158\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources.png 1686w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources-300x93.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources-1024x316.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources-768x237.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/connect-data-sources-1536x475.png 1536w\" sizes=\"auto, (max-width: 1686px) 100vw, 1686px\" \/><\/figure>\n\n\n\n<p>Select <strong>Facebook Pixel<\/strong> and click on <strong>Connect<\/strong>.<\/p>\n\n\n\n<p>Add a name for your pixel and enter the website URL.<\/p>\n\n\n\n<p>Click <strong>Continue<\/strong>.<\/p>\n\n\n\n<p>You will receive your personal Facebook pixel code at this stage.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"1259\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel.png\" alt=\"your Facebook pixel\" class=\"wp-image-2167\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel.png 1017w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-242x300.png 242w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-827x1024.png 827w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-768x951.png 768w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p>Copy this code somewhere safe for the time being. We&#8217;ll use this snippet in a moment to enable the pixel on your WordPress website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"how-to-create-a-facebook-pixel-in-facebook-business\">How to create a Facebook pixel in Facebook Business<\/h3>\n\n\n\n<p>Go to the main <a href=\"https:\/\/business.facebook.com\/settings\/\" rel=\"nofollow noopener\" target=\"_blank\">Business Settings<\/a> in Facebook Business.<\/p>\n\n\n\n<p>From the left sidebar, go to <strong>Data Sources \u2192 Pixels<\/strong>. Click on the <strong>Add<\/strong> button that&#8217;s in the center.<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1688\" height=\"932\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1.png\" alt=\"Facebook pixel in Facebook Business\" class=\"wp-image-2170\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1.png 1688w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1-300x166.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1-1024x565.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1-768x424.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/Facebook-Business-pixels-1-1536x848.png 1536w\" sizes=\"auto, (max-width: 1688px) 100vw, 1688px\" \/><\/figure>\n\n\n\n<p>Enter a name for your pixel and the address of your website. Click on <strong>Continue<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"926\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/create-pixel.png\" alt=\"create pixel\" class=\"wp-image-2159\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/create-pixel.png 1011w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/create-pixel-300x275.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/create-pixel-768x703.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/figure>\n\n\n\n<p>In the next step, select the option to <strong>Set up the Pixel Now<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1003\" height=\"801\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/set-up-pixel.png\" alt=\"set up pixel\" class=\"wp-image-2166\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/set-up-pixel.png 1003w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/set-up-pixel-300x240.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/set-up-pixel-768x613.png 768w\" sizes=\"auto, (max-width: 1003px) 100vw, 1003px\" \/><\/figure>\n\n\n\n<p>Lastly, select the option to <strong>Manually add pixel code to website<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"1009\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/manually-add-pixel.png\" alt=\"manually add pixel\" class=\"wp-image-2165\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/manually-add-pixel.png 960w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/manually-add-pixel-285x300.png 285w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/manually-add-pixel-768x807.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>In the next panel, you will get your unique Facebook pixel code.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"1259\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel.png\" alt=\"your Facebook pixel\" class=\"wp-image-2167\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel.png 1017w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-242x300.png 242w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-827x1024.png 827w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/your-Facebook-pixel-768x951.png 768w\" sizes=\"auto, (max-width: 1017px) 100vw, 1017px\" \/><\/figure>\n\n\n\n<p>You&#8217;ll use that piece of code in the next step, which is when we&#8217;ll finally add Facebook pixel to WordPress:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-add-facebook-pixel-to-word-press-using-the-blocksy-theme-\ud83d\udc4d\">How to add Facebook pixel to WordPress using the Blocksy theme \ud83d\udc4d<\/h2>\n\n\n\n<p>\ud83d\udccb <em>Note; if your site doesn&#8217;t use the Blocksy theme, first of all, it should! Seriously, <a href=\"https:\/\/creativethemes.com\/blocksy\/\">check it out<\/a>! In the meantime, we do show you the manual method of adding the Facebook pixel to your site later in this guide as well.<\/em><\/p>\n\n\n\n<p>The great thing about using Blocksy as your theme is that it can handle many additional side-elements that go beyond your website&#8217;s appearance. One of those side-elements is letting you add Facebook pixel to WordPress easily.<\/p>\n\n\n\n<p>Moreover, with Blocksy, you can choose whether you want the Facebook pixel added to the entire website or just select pages\/posts within the site. This type of setup can be useful if you&#8217;re only running Facebook campaigns that relate back to parts of your site and you don&#8217;t want to have Facebook lurking in the dark on every single sub-page.<\/p>\n\n\n\n<p>Here&#8217;s how to add Facebook pixel to WordPress with Blocksy:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"activate-the-custom-code-snippets-extension\">Activate the Custom Code Snippets extension<\/h3>\n\n\n\n<p>With Blocksy enabled as your theme, go to your wp-admin, into <strong>Blocksy \u2192 Extensions \u2192 Pro Extensions<\/strong>. (A <a href=\"https:\/\/creativethemes.com\/blocksy\/premium\/\">Blocksy Pro<\/a> subscription is required.)<\/p>\n\n\n\n<p>Activate the <strong>Custom Code Snippets<\/strong> extension:<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1680\" height=\"832\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate.png\" alt=\"Activate the Custom Code Snippets\" class=\"wp-image-2160\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate.png 1680w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate-300x149.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate-1024x507.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate-768x380.png 768w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/custom-code-snippets-activate-1536x761.png 1536w\" sizes=\"auto, (max-width: 1680px) 100vw, 1680px\" \/><\/figure>\n\n\n\n<p>At this stage, you can pick whether you want to add the Facebook pixel only to select pages or your entire website:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-a-add-the-facebook-pixel-to-the-entire-website\">Option a): Add the Facebook pixel to the entire website<\/h3>\n\n\n\n<p>Fire up the WordPress Customizer and scroll down to the <strong>Custom Code Snippets<\/strong> section in the sidebar.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"690\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/customizer-custom-code-snippets.png\" alt=\"customizer custom code snippets\" class=\"wp-image-2161\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/customizer-custom-code-snippets.png 508w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/customizer-custom-code-snippets-221x300.png 221w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/figure>\n\n\n\n<p>Grab your Facebook pixel code and paste it into the <strong>Header scripts<\/strong> box:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"726\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/header-scripts.png\" alt=\"header scripts\" class=\"wp-image-2164\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/header-scripts.png 510w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/header-scripts-211x300.png 211w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<p>Click on the <strong>Publish<\/strong> button to save the changes.<\/p>\n\n\n\n<p>From now on, the Facebook pixel is enabled on all pages and posts within your website!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-b-add-the-facebook-pixel-to-select-pages-posts-only\">Option b): Add the Facebook pixel to select pages\/posts only<\/h3>\n\n\n\n<p>If you want only a few select pages to have some interaction established with your Facebook ad campaigns, then there&#8217;s no need to add the pixel to the entire site. Blocksy lets you add the pixel only to the exact pages where it is needed.<\/p>\n\n\n\n<p>When editing any post or page, click on the Blocksy icon in the corner and then scroll down to the <strong>Custom Code Snippets<\/strong> section:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"1287\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-post-edit-snippets.png\" alt=\"blocksy post edit snippets\" class=\"wp-image-2156\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-post-edit-snippets.png 559w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-post-edit-snippets-130x300.png 130w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-post-edit-snippets-445x1024.png 445w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/figure>\n\n\n\n<p>Grab your Facebook pixel code and paste it into the <strong>Header scripts<\/strong> box:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"985\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-snippet-add-to-post.png\" alt=\"blocksy snippet add to post\" class=\"wp-image-2157\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-snippet-add-to-post.png 557w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/blocksy-snippet-add-to-post-170x300.png 170w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/figure>\n\n\n\n<p>Click on the <strong>Update<\/strong> button to save the post.<\/p>\n\n\n\n<p>At this stage, the Facebook pixel has been enabled on a single page\/post only. To add the pixel to more posts or pages, edit them one by one and repeat the steps above.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-add-facebook-pixel-to-word-press-manually\">How to add Facebook pixel to WordPress manually<\/h2>\n\n\n\n<p>If your blog runs on a different theme than Blocksy, you can still add the Facebook pixel pretty easily. Use a plugin called <a href=\"https:\/\/wordpress.org\/plugins\/insert-headers-and-footers\/\" rel=\"nofollow noopener\" target=\"_blank\">Insert Headers and Footers<\/a> for that.<\/p>\n\n\n\n<p>Once you have the plugin activated, go to <strong>Settings \u2192 Insert Headers and Footers<\/strong> and paste your Facebook pixel code into the <strong>Scripts in Header<\/strong> section, like so:<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1313\" height=\"745\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/head-code.png\" alt=\"head code\" class=\"wp-image-2163\" srcset=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/head-code.png 1313w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/head-code-300x170.png 300w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/head-code-1024x581.png 1024w, https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2021\/05\/head-code-768x436.png 768w\" sizes=\"auto, (max-width: 1313px) 100vw, 1313px\" \/><\/figure>\n\n\n\n<p>This will add the pixel to the entire site. As far as adding the pixel to individual posts, this is not a feature that the plugin offers.<\/p>\n\n\n\n<p>Alternatively, for an ultra-manual setup, you can also add the Facebook pixel snippet by hand to your theme&#8217;s source files directly. Most probably, you will need to add that to the <code>header.php<\/code> file, but the exact file will depend on the structure of your theme.<\/p>\n\n\n\n<p>Keep in mind, however, that this is a more invasive operation, and it can lead to some problems down the road. Particularly, if you ever update the theme, the code will go away and you&#8217;ll need to re-include it.<\/p>\n\n\n\n<p>As for where to place the pixel code, here&#8217;s an excerpt from Facebook&#8217;s rulebook:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Copy and paste the pixel code into the bottom of the header section of your site, just above the tag. Install the base code on every page of your website.<\/p>\n<\/blockquote>\n\n\n\n<p>Many still wonder <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/add-google-analytics-4-wordpress\/\">how to integrate Google Analytics 4 in WordPress<\/a>? We are here to solve this issue with our new guide.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"specific-use-cases-for-facebook-pixel\">Specific Use Cases for Facebook Pixel<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Retargeting Website Visitors<\/strong>. The Facebook Pixel allows businesses to retarget users who visited specific pages but didn\u2019t complete desired actions. For example:\n<ul class=\"wp-block-list\">\n<li>An eCommerce store can show ads to visitors who abandoned their carts, encouraging them to complete their purchase.<\/li>\n\n\n\n<li>A blogger can retarget users who read an article but didn\u2019t subscribe to the newsletter.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Tracking Sign-Ups or Leads<\/strong>. Businesses can track when users sign up for services, download resources, or fill out forms. For instance:\n<ul class=\"wp-block-list\">\n<li>A SaaS company can measure how many people clicked on their &#8220;Start Free Trial&#8221; button and completed the signup process.<\/li>\n\n\n\n<li>A webinar host can identify which users registered for the event after seeing a Facebook ad.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Monitoring Sales Conversions<\/strong>. By integrating Facebook Pixel with their checkout process, businesses can track sales conversions and the return on ad spend (ROAS). Examples include:\n<ul class=\"wp-block-list\">\n<li>Tracking purchases from specific ad campaigns to understand which ads are driving the most revenue.<\/li>\n\n\n\n<li>Identifying trends, like which product categories are most popular among Facebook ad-driven traffic.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Optimizing Ad Campaigns<\/strong>. Pixel data can be used to create Lookalike Audiences\u2014targeting new potential customers who share traits with your existing audience. For example:\n<ul class=\"wp-block-list\">\n<li>A fitness brand can use Pixel data to find users similar to those who recently purchased a yoga mat.<\/li>\n\n\n\n<li>An online course provider can create ads targeting users who resemble those who completed a registration form.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Analyzing User Behavior<\/strong>. The Pixel tracks interactions, such as viewing content, adding items to a wishlist, or spending time on certain pages. Businesses can:\n<ul class=\"wp-block-list\">\n<li>Identify popular content to amplify in future ad campaigns.<\/li>\n\n\n\n<li>Adjust their website design to guide users toward conversion points.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scenarios-where-not-using-facebook-pixel-could-hurt-your-campaigns\">Scenarios Where Not Using Facebook Pixel Could Hurt Your Campaigns<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Inefficient Ad Spending<\/strong>. Without a Facebook Pixel, ads target broader audiences with less precision. This increases the cost per click (CPC) and lowers the return on investment (ROI).<\/li>\n\n\n\n<li><strong>Lack of Retargeting<\/strong>. Without retargeting capabilities, businesses miss out on engaging users who showed interest but didn\u2019t convert. For example:\n<ul class=\"wp-block-list\">\n<li>An online retailer loses the chance to remind visitors about items they left in their shopping carts.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Missed Insights for Optimization<\/strong>. Without Pixel data, businesses can\u2019t measure which ads drive results or how visitors interact with their site after clicking an ad. This leads to poorly optimized campaigns.<\/li>\n\n\n\n<li><strong>Inability to Create Lookalike Audiences<\/strong>. Without the Pixel, businesses can\u2019t build Lookalike Audiences, which are proven to deliver better results by targeting people similar to existing customers.<\/li>\n\n\n\n<li><strong>Reduced Conversion Tracking<\/strong>. Without the Pixel, businesses have limited visibility into what happens post-click. For instance, an ad might drive traffic, but there\u2019s no way to measure how many people purchased, signed up, or engaged.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advantages-of-blocksys-custom-code-snippets-over-manual-methods\">Advantages of Blocksy\u2019s Custom Code Snippets Over Manual Methods<\/h2>\n\n\n\n<p>Blocksy\u2019s&nbsp;<strong>Custom Code Snippets<\/strong>&nbsp;feature, available in the Pro version, offers significant advantages over traditional manual methods for adding Facebook Pixel code:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unlike traditional methods that apply Facebook Pixel globally, Blocksy allows users to target specific pages or posts. This is ideal for:<\/li>\n\n\n\n<li>Running campaigns focused on particular products or landing pages.<\/li>\n\n\n\n<li>Avoiding unnecessary Pixel code on non-relevant pages, which can reduce site load time and improve privacy compliance.<\/li>\n\n\n\n<li>The Blocksy interface is designed with ease of use in mind. Users can manage and update their snippets without diving into theme files, reducing the risk of errors.<\/li>\n\n\n\n<li>Blocksy eliminates the need for third-party plugins like\u00a0<strong>Insert Headers and Footers<\/strong>, reducing plugin overhead and improving site performance.<\/li>\n\n\n\n<li>Traditional manual methods involve editing theme files (e.g.,\u00a0<code>header.php<\/code>), which can lead to issues during theme updates. With Blocksy, snippets are stored independently, ensuring updates don\u2019t overwrite custom code.<\/li>\n\n\n\n<li>Changes made using Blocksy\u2019s Custom Code Snippets are instantly reflected in the WordPress Customizer preview, allowing users to see how their code affects the site in real time.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"thats-it-\ud83c\udf7e\">That&#8217;s it! \ud83c\udf7e<\/h2>\n\n\n\n<p>With these simple steps, we&#8217;ve just managed to add Facebook pixel to WordPress!<\/p>\n\n\n\n<p>As you can see, this is super-easy with the Blocksy theme. Plus, you get the added benefit of being able to add the pixel to select posts or pages only.<\/p>\n\n\n\n<p>If you haven&#8217;t checked out Blocksy yet, <a href=\"https:\/\/creativethemes.com\/blocksy\/\">give it a go here<\/a>. The free version of the theme is one of the most functional and easy-to-use solutions of this type on the market!<\/p>\n\n\n\n<p>We are publishing guides and how-to&#8217;s constantly. If you want to know how to <a href=\"https:\/\/creativethemes.com\/blocksy\/blog\/add-contact-form-wordpress\/\">create custom contact forms in WordPress<\/a>, move to the next article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re wondering how to add Facebook pixel to WordPress, you&#8217;re in the right place. In this straightforward tutorial, we explain what a Facebook pixel is, why you&#8217;d want to use it on your WordPress site, and how to set it up. What Is the Facebook Pixel and Why Use It? \ud83d\udd38 Let me just [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2364,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/2155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=2155"}],"version-history":[{"count":13,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/2155\/revisions"}],"predecessor-version":[{"id":12353,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/posts\/2155\/revisions\/12353"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media\/2364"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=2155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/categories?post=2155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/tags?post=2155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}