ClickCease How to insert facebook ad conversion code into individual wordpress page - King Kong

How to insert facebook ad conversion code into individual wordpress page

By September 25, 2014Facebook Advertising

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.

 

Leave a Reply

5 Ways To Double Your Sales In 90 Days

Free Report

We have generated over $200 million in sales with the 5 unbelievably powerful strategies outlined in this free report. Download it now before this page comes down or your competitors get their hands on it.

All Rights Reserved King Kong