Can two independent Facebook Pixel exist on the same page

canuckconsulting
canuckconsulting used Ask the Experts™
on
We have  a need to track conversions using two Facebook pixels on our ecommerce site.  Would we be ok to include two pixel codes as per below?

<script>
<!-- Facebook Pixel Code -->
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '111111111111111');
  fbq('track', 'PageView');
</script>
<script>
<!-- Facebook Pixel Code -->
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '222222222222222');
  fbq('track', 'PageView');
</script>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
Yes.

And sometimes this is easier to manage with GTM, where you create one GTM container, then populate the container with your pixels.

This makes management much easier, if your working with many site + page variations... where variations means many different pixel combinations in play.

Author

Commented:
Interesting David.  We've not used GTMs previously but keen to check it out.  How would this help us with having two Facebook pixels on all our pages?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial