Facebook pixel in Wordpress

7 replies
I'm pretty confused about the new Facebook pixel and how to implement it on a Wordpress site. Would appreciate any help.

On certain posts of my Wordpress site, I'd like to be able to retarget people who visit that post and also later create a lookalike audience from them.

How does one do this? Am I correct in saying you paste the default base pixel in the head of the Wordpress site and then in Facebook you create a Custom Audience for the specific URLs that you want to retarget and build lookalike audiences from? Is that it? Or am I missing something? Is there any specific code that one has to paste in the Wordpress site in regards to custom audiences or is it just the standard, default pixel that you paste and that's it?

Pretty confused about it all. Thanks.
#facebook #pixel #wordpress
  • Profile picture of the author Hearn
    Facebook merged all pixels into a single one. That pixel can be used for both retargeting and conversion tracking.

    To add it in WordPress you have to options:

    -add it to every WordPress page from your theme menu
    -use a plugin to add the code to specific pages

    Note that if you create a html page using Leadpages or other service and upload it to your server it will not have the code because it's not an WordPress page so you have to add the code manually.

    So add the pixel and check in Facebook if it fires. At a later date you can create an audience and use the condition "people that visited www.yoursite .com" (or however is formulated in Facebook).
    {{ DiscussionBoard.errors[10655355].message }}
    • Profile picture of the author warrenonline
      Originally Posted by Hearn View Post

      Facebook merged all pixels into a single one. That pixel can be used for both retargeting and conversion tracking.

      To add it in WordPress you have to options:

      -add it to every WordPress page from your theme menu
      -use a plugin to add the code to specific pages

      Note that if you create a html page using Leadpages or other service and upload it to your server it will not have the code because it's not an WordPress page so you have to add the code manually.

      So add the pixel and check in Facebook if it fires. At a later date you can create an audience and use the condition "people that visited www.yoursite .com" (or however is formulated in Facebook).
      Okay. So do I just paste the base, default pixel that Facebook gives me into all the pages of my Wordpress site, the one that looks like this:

      <script>
      !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=f unction(){n.callMethod?
      n.callMethod.apply(n,arguments):n.queue.push(argum ents)};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', '111111111');
      fbq('track', "PageView");</script>
      <noscript><img height="1" width="1" style="display:none"
      src=https://www.facebook.com
      /></noscript>

      And that's it? And then I can create a custom audience just from within Facebook? Or do I have to change anything in the above code when I create a custom audience? In other words, is the entire custom audience part done on the Facebook side and the code above doesn't change at all? Thanks.
      {{ DiscussionBoard.errors[10655366].message }}
  • Profile picture of the author Hearn
    Yes just add the pixel to WordPress. Then visit your website yourself and after awhile check if the pixel shows activity in Facebook. That means it is set up correctly. With this you are done with the website, all you have to do is create your audience. Unless Facebook switches to separate pixels again, which I doubt since this is so much simpler.
    {{ DiscussionBoard.errors[10655480].message }}
  • Profile picture of the author warrenonline
    Thanks, Hearn.
    {{ DiscussionBoard.errors[10655523].message }}
  • Profile picture of the author Peter Stavrou
    Add it in your header.php by going to Appearances then Editor (or you could use FTP)

    Like this:
    Screenshot by Lightshot
    Signature

    Online Business Made Simple!
    http://www.PeterStavrou.com

    {{ DiscussionBoard.errors[10655533].message }}
    • Profile picture of the author warrenonline
      Originally Posted by Peter Stavrou View Post

      Add it in your header.php by going to Appearances then Editor (or you could use FTP)

      Like this:
      Screenshot by Lightshot
      Thanks for that. Yeah, I knew how to do that part; I used the Header and Footer plugin for WordPress. It was just what to paste and how it relates to custom audiences that I couldn't figure out. But thanks for taking the time. Appreciated.
      {{ DiscussionBoard.errors[10655551].message }}
    • Profile picture of the author semahsedut
      Originally Posted by Peter Stavrou View Post

      Add it in your header.php by going to Appearances then Editor (or you could use FTP)

      Like this:
      Screenshot by Lightshot
      thanks bro..useful
      {{ DiscussionBoard.errors[10655560].message }}

Trending Topics