Adding a Facebook conversion tracking pixel to the Checkout Complete page

PRESSERO > *Pressero FAQs
Facebook's conversion tracking requires that you install a Facebook pixel on every page in your site, and one that is only on the order confirmation (or checkout complete/successful) page. You can add the Facebook-provided code for both of these items in Site > Settings for your B2C site.
  • For a single PageView pixel that goes on every page, always the same, go to the SEO/HTML tab and paste the code into the Edit HTML Head Content area.
  • For a single Purchase pixel that needs to appear only on the order confirmation page, go to the Instructions tab. In the Checkout Successful Page Instructions area, click the "</>" button to open the HTML editor. Paste the Facebook-provided code into that editor; then click Update.
  • If you need only one pixel on each page, and it should be a PageView type on most pages but a Purchase type on the Checkout Successful page, then do not paste anything into the Checkout Successful Page Instructions area. Instead, JavaScript similar to the following into the SEO/HTML tab, Edit HTML Head Content area:

fbq('init', 'idNumberFromFacebook');
if (location.pathname.match("^/complete/")) {
  fbq('track', 'Purchase', {value: $(".summaryTotal span").text(), currency:'USD'});
} else {
  fbq('track', "PageView");

When you are finished, click the blue Save button.