{"id":4248,"date":"2020-05-18T08:56:32","date_gmt":"2020-05-18T08:56:32","guid":{"rendered":"https:\/\/trackingchef.com\/?p=4248"},"modified":"2020-12-15T18:18:20","modified_gmt":"2020-12-15T15:18:20","slug":"creating-and-installing-a-facebook-pixel","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/facebook\/creating-and-installing-a-facebook-pixel\/","title":{"rendered":"Creating and installing a Facebook Pixel"},"content":{"rendered":"\n

In this post I\u2019ll show how to quickly and efficiently set up a new pixel in Facebook.<\/p>\n\n\n\n

Creating a Facebook Pixel<\/h2>\n\n\n\n

Creating your pixel can be done only after setting up an active Facebook Ads account.<\/p>\n\n\n\n

  1. In your account, navigate to ‘Events Manager’.<\/li>
  2. Click on ‘Add New Data Source’ and select ‘Facebook Pixel’<\/li>
  3. Name your pixel something memorable, e.g. your site’s name<\/li>
  4. Optionally, you can enter your site’s URL for installation instructions to match your specific CMS (e.g. WordPress, Wix etc.)
    \"\"<\/li><\/ol>\n\n\n\n

    Installing your Facebook Pixel<\/h2>\n\n\n\n

    Next, you will be prompted to choose your pixel installation method.<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n
    1. Partner Integration – Uses the standard integrations for CMS’s that support Facebook’s Pixel via a native plugin. Recommended for site’s that require only a simple implementation.<\/li>
    2. Manually – Get the pixel’s code snippet and add it manually to your site (details below)<\/li>
    3. Email instructions to developer (same as manual)<\/li><\/ol>\n\n\n\n

      Manually installing the Facebook Pixel<\/h2>\n\n\n\n

      After selecting the Manual installation option, you will see your pixel’s code snippet.<\/p>\n\n\n\n

      \"\"<\/figure><\/div>\n\n\n\n

      To properly install Facebook Pixel, add the snippet on all pages of your website, preferably as high up as possible on the <head> tag. Adding the pixel to the <body> tag will also work, but might result in discrepancies in tracking, as some users might leave the page before<\/strong> the pixel snippet has fully loaded.<\/p>\n\n\n\n

      Installing the Facebook Pixel using Google Tag Manager<\/h2>\n\n\n\n

      There are two ways to add the Facebook pixel to your site with Google Tag Manager (GTM):<\/p>\n\n\n\n

      1. Custom Template Tag (recommended)<\/li>
      2. Custom HTML Tag<\/li><\/ol>\n\n\n\n

        The installation method below covers only the PageView event, which is the standard event for tracking users on your site. This event can also be used to create Custom Conversions for users that reach a Thank You page that can be identified by its URL. Conversions without a dedicated URL, e.g. only a confirmation notice, will require additional event tagging.<\/p>\n\n\n\n

        Custom Template Tag (recommended)<\/h3>\n\n\n\n

        With GTM being a Google solution, Facebook hasn’t invested in creating their standard GTM Tag. Heck, it took them a few years to even put up a documentation for adding their pixel using GTM.<\/p>\n\n\n\n

        With GTM’s introduction of Community Templates, one immediate template that was added was obviously the Facebook Pixel, by Simo Ahava.<\/p>\n\n\n\n

        I recommend using this template as it loads the script in a much more efficient manner and minimizes the risk of you breaking stuff on your site.<\/p>\n\n\n\n

        To create this tag you will need to import it into your account, which will open some scary looking windows asking for permissions to you GTM container. In many cases I would advise against these, but since this template was developed by a trusted source such as Simo, I can rest assure it is both pixel perfect and contains no malicious code.<\/p>\n\n\n\n

        1. Go to your GTM account and open the relevant container<\/li>
        2. Click \u201cAdd a new tag\u201d<\/li>
        3. Name the tag something memorable, e.g. Facebook Pixel Pageview<\/li>
        4. Under Tag Configuration select \u201cDiscover more tag types in the Community Template Gallery\u201d<\/li>
        5. Search for ‘Facebook Pixel’ and select the Facebook Pixel tag by ‘gtm-templates-simoahava’
          \"\"<\/li>
        6. Grant all the required permissions<\/li>
        7. Enter your Facebook Pixel’s ID, e.g. 706900066724012<\/li>
        8. Under ‘Event Name’, verify that ‘PageView’ is selected<\/li>
        9. Under Triggering, choose a new trigger. The default trigger is \u201cAll Pages\u201d, which will load the FB tag on all website pages\"\"<\/li>
        10. Click Save<\/li><\/ol>\n\n\n\n

          Be sure to publish the changes in your GTM container by clicking Submit and then Publish<\/p><\/blockquote>\n\n\n\n

          Custom HTML Tag<\/h3>\n\n\n\n

          With no standard Facebook tag available (unlike all other major platforms), the standard way for implementing the Facebook pixel for years has been by adding it as a Custom HTML tag. This approach has its technical downsides, surely on SPA\/PWA sites, but in most cases worked fine.<\/p>\n\n\n\n

          1. Go to your GTM account and open the relevant container<\/li>
          2. Click \u201cAdd a new tag\u201d<\/li>
          3. Name the tag something memorable, e.g. Facebook Pixel Pageview<\/li>
          4. Under Tag Configuration select Tag Type \u201cCustom HTML\u201d<\/li>
          5. In the HTML box, paste the pixel’s snippet
            \"\"<\/li>
          6. Under Triggering, choose a new trigger. The default trigger is \u201cAll Pages\u201d, which will load the FB tag on all website pages
            \"\"<\/li>
          7. Click Save<\/li><\/ol>\n\n\n\n

            Be sure to publish the changes in your GTM container by clicking Submit and then Publish<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"

            In this post I\u2019ll show how to quickly and efficiently set up a new pixel in Facebook.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4248"}],"collection":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/comments?post=4248"}],"version-history":[{"count":8,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4248\/revisions"}],"predecessor-version":[{"id":4807,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4248\/revisions\/4807"}],"wp:attachment":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/media?parent=4248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/categories?post=4248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/tags?post=4248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}