Semrush Black Friday - 30% Off!  GO!
wordpress snippets

Inject Facebook or Google Pixels into the Head Section in WordPress

Last modified: January 13, 2020


Add the above to the functions file and switch the “PIXEL GOES HERE” with the pixels you need to inject to the head of your WordPress site.

add_action('wp_head', 'inject_into_head');
function inject_into_head(){
<!-- Facebook Pixel Code -->
<!-- End Facebook Pixel Code -->


Show More

* This button will show the rest of the post and open up an offer from a vendor
Save 4 Later
Email liked links to yourself