<\/figure><\/div>\n\n\n\nTo 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\nInstalling 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
Custom Template Tag (recommended)<\/li> Custom HTML Tag<\/li><\/ol>\n\n\n\nThe 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
Go to your GTM account and open the relevant container<\/li> Click \u201cAdd a new tag\u201d<\/li> Name the tag something memorable, e.g. Facebook Pixel Pageview<\/li> Under Tag Configuration select \u201cDiscover more tag types in the Community Template Gallery\u201d<\/li> Search for ‘Facebook Pixel’ and select the Facebook Pixel tag by ‘gtm-templates-simoahava’ <\/li> Grant all the required permissions<\/li> Enter your Facebook Pixel’s ID, e.g. 706900066724012<\/li> Under ‘Event Name’, verify that ‘PageView’ is selected<\/li> Under Triggering, choose a new trigger. The default trigger is \u201cAll Pages\u201d, which will load the FB tag on all website pages <\/li> Click Save<\/li><\/ol>\n\n\n\nBe 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
Go to your GTM account and open the relevant container<\/li> Click \u201cAdd a new tag\u201d<\/li> Name the tag something memorable, e.g. Facebook Pixel Pageview<\/li> Under Tag Configuration select Tag Type \u201cCustom HTML\u201d<\/li> In the HTML box, paste the pixel’s snippet <\/li> Under Triggering, choose a new trigger. The default trigger is \u201cAll Pages\u201d, which will load the FB tag on all website pages <\/li> Click Save<\/li><\/ol>\n\n\n\nBe 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":[],"class_list":["post-4248","post","type-post","status-publish","format-standard","hentry","category-facebook"],"_links":{"self":[{"href":"https:\/\/trackingchef.com\/wp-json\/wp\/v2\/posts\/4248","targetHints":{"allow":["GET"]}}],"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}]}}