Best SEO and PPC Tool - Extended Free Trial  GO!
wordpress snippets

Inject Facebook or Google Pixels into the Head Section in WordPress

Last modified: January 13, 2020

Cloudways

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 -->
PIXEL GOES HERE
<!-- End Facebook Pixel Code -->
<?php
};

 

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