If you are running any Facebook marketing, you sure would want to track the conversions. The Facebook script needs to go between the <head></head> tags of your wordpress website. So if you add it on the header.php file, it will appear on all pages. The easiest solution is to add a conditional if statement and then follow it by the code so it appears only on the page you would want it to.

For example:

In the header.php file between the <head></head> tags anywhere add –

<?php if (is_page($page)) { ?>

<!– Paste the Facebook Conversion Code here  –>

<?php } ?>

That’s it, now replace $page with the page id. If you have post name in your URL you can find your page id by logging into the WP admin and editing the page. Now look at the url, there will be a part where it says post=123 – where 123 is the post id.

So now your conditional if state will be <?php is_page(123); ?>

Once it is done, save the changes, refresh the page and look for the conversion code in the page’s source code.