[Support request] Facebook Pixel using Elements

Home Forums Support Facebook Pixel using Elements

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #870611
    JC

    Heya, so I’m setting up my FB pixel again. it was firing but all of a sudden, it’s not showing up in my Chrome extension and when I look at the code, I’m not seeing it there either.

    https://jcdfitness.com/

    I’m following these steps:

    > Add new element
    > Choose element type: header
    > paste the Pixel code
    > Display Rules: Entire Site
    > save

    This has worked for my Google Anal code but for some reason, I cannot get it to work for the FB pixel.

    Am I missing something?

    I’ve tried purging the cache a bunch, too.

    #870644
    David
    Staff
    Customer Support

    Hi there,

    instead of the Header Element use the Hook Element. Within that you should select the WP_head hook.

    #870653
    JC

    alrighty — just did that and it’s working now.

    but here’s my next question… why is this working with my Google analytics code with the previous instructions, and why would you pick the Hook version over the Header element?

    #870662
    David
    Staff
    Customer Support

    Google is probably a little more flexible shall we say.
    These types of scripts have to be added between the <head></head> tags of the website. This is where the WP_head hook is and is provided for exactly that.

    The Header Element is for adding content to the page and shouldn’t be used for adding scripts, links or other types of meta data.

    #870669
    JC

    thanks. very good to know. I’ll go make those changes to my google scripts!

    #870688
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.