Jump to content

Archived

This topic is now archived and is closed to further replies.

gsquared

Tracking code on a specific page header

Recommended Posts

gsquared

Hello,

 

I am running an ad campaign in Facebook and I want to track conversions. Facebook has a tracking code I can place and I want to place it on the Thank You page of the website. It needs to be placed between <head> and </head>.

 

1) How can I place the tracking code on a specific page header only? I want to place it on my Thank You page once they've opted in on the home page.

 

2) I'm wondering if this might interact negatively with PageLines DMS. It's a javascript tracking pixel.

 

Does anyone have any ideas about this?

 

PageLines 1.1.7

WP 3.8.1

Share this post


Link to post
Share on other sites
James B

Hi there, anything placed within the <head> tags will go onto all pages as the header is called on each page in your site.

 

To add this click on the custom code icon in the DMS control panel. Click on custom scripts and paste your code into that panel and save. This places your code within the head tags.

 

http://screencast.com/t/2l73Kme2ZRCU


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
gsquared

Hi and thanks for the information.

 

Is there a way to only have it on the header of a certain page? The reason is because my tracking code tracks "conversions" which means I want it track only people have visited the home page/main page and opt-ed in and reached the thank you page. If the code shows up on the home page, then it will count all visitors as a "conversion" which of course is inaccurate.

Share this post


Link to post
Share on other sites
James B

Hmm ok, reading through some other posts you'll need to use a hook to get this to work. For an overview on hooks see - http://docs.pagelines.com/advanced/hooks you'll need to use the base theme or customize plugin to be able to add the code to the functions.php in there to keep it safe from when you update the main theme. The base theme can be downloaded from https://github.com/bearded-avenger/nicks-base-theme or the customize plugin from http://www.pagelines.com/api/store_free/plugin-pagelines-customize.zip

 

For the code you need add see http://wpsites.net/wordpress-tips/tracking-code-specific-page/ look at the section 'custom function works with all themes'. Change the page ID to that of the page you want to add the code, and then insert your code in the area it prompts you to.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
gsquared

Hi James, excellent! This is what I was looking for!

 

Thanks

Gary

Share this post


Link to post
Share on other sites
Danny

Thanks for informing us the issue has been resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×