Site logo

Archived topic

Can Hooks be used to insert Facebook pixel code?

3 replies · Started by mmarvel on July 28, 2017

Viewing posts 1–4 of 4

Hi

Can I use hooks to insert facebook pixel javascript code into the header and fb view_page into the body of a page?

Thanks. MJ

Thanks Leo.

I'm not quite sure the difference between these

wp_head vs before header <--- they both seem like before <head>

header vs after header <--- both seem like before </head>

before content is before <body> ?? but then that would also be before </head>

before footer is like before </body> ??

I'm little confused since i'm just use to putting code in before </head> , after </head> or before footer usually before </body> so could you either point me to where these are covered in your doc's or give me the overview.

My apologies if this is already covered somewhere.

B/R Martha

wp_head is a standard WordPress hook that is more to store like functions, Google Analytics.

Before header is more for regular HTML contents.

This archived topic is closed to new replies.