-
AuthorPosts
-
April 15, 2014 at 1:12 am #251380
Hi there,
How do I add code to a specific page on my website? I’ve tried adding a text box and going to the “text” tab and inserting the code there, but when I open the page source, it inserts <br> and </p> into the code which is causing it not to work? Is there a way to insert the code to a page directly on the source and not using the default editor or avia layout builder?
Basically, I’d like to add the Google Adwords Conversion Tracking code. But when I go to the source it adds bits of code to it. Also the form is a Woofoo Form.
How do I fix this?
Mark
April 15, 2014 at 4:03 pm #251668Hey Mark!
You can add following code to Functions.php file in Appearance > Editor
if ( is_page( 1122 )) { echo 'your code goes here'; }
1122 is a page id, you can change it to match your pages id. You can right click on Chrome or Firefox to inspect elements to find page ID’s http://i.imgur.com/HyPTCRg.jpg
Best regards,
YigitMay 19, 2014 at 11:11 pm #267027I have the same request. Followed your instructions and my analytics still cant detect the conversion pixel. Is there a specific place in functions.php to add this tracking code?
Mike
FWLAMay 19, 2014 at 11:31 pm #267039Hey!
At the very end, something like this will do it:
function custom_code(){ if ( is_page( 1122 )) { ?> CODE HERE <?php } } add_action('wp_footer', 'custom_code');
Regards,
JosueMay 19, 2014 at 11:36 pm #267044Josue,
Below is what I added. Please tell me if that’s correct.
Thanks
Mike
————————————————————
Added below the very last line of code in functions.php
———————————————————————–
function custom_code(){
if ( is_page( 24 )) {
?>
<!– secure image tag –>
<img src=”https://admanager.namidirect.com/conversion/qQSDZhZyj7XRchfchRa?image=true”
height=”1″ width=”1″ style=”visibility:hidden;” />
<?php
}
}
add_action(‘wp_footer’, ‘custom_code’);May 19, 2014 at 11:37 pm #267048Yes, that should work, if it doesn’t post a link to page 24.
Cheers!
Josue- This reply was modified 10 years, 6 months ago by Josue.
May 19, 2014 at 11:39 pm #267051Its the last step in a 4 step form via contact form 7.
http://relief.vantageacceptance.com/step-four/
Mike
May 19, 2014 at 11:41 pm #267054Hi Mike,
It’s working:
Regards,
JosueOctober 29, 2014 at 10:08 pm #343020Please help.
I followed these instructions and put in my pixel code for my Facebook ad campaign. Now my site is completly blank. I cannot log in on the admin side, nor can I navigate to any part of the page.
PLEASE HELP!!!! Thank you,Elizabeth
if ( is_page( 3556 )) {
echo ‘<!– Facebook Conversion Code forhttp://captix.com/3556-2/ –>
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement(‘script’);
fbds.async = true;
fbds.src = ‘//connect.facebook.net/en_US/fbds.js’;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window._fbq = window._fbq || [];
window._fbq.push([‘track’, ‘6018719701150’, {‘value’:’0.01′,’currency’:’USD’}]);
</script>
<noscript></noscript>
‘;
}October 29, 2014 at 11:03 pm #343056Hi Elizabeth,
Can you please create me an temporary FTP account? post it here as a private reply.
Regards,
JosueOctober 30, 2014 at 2:53 pm #343423This reply has been marked as private.October 30, 2014 at 6:24 pm #343520November 4, 2014 at 10:43 pm #346187This reply has been marked as private.November 5, 2014 at 12:31 am #346262Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueNovember 5, 2014 at 10:01 pm #346777This reply has been marked as private.November 6, 2014 at 6:06 am #346974Hey Elizabeth!
It’s done, check the 3556 (id) Page source.
Best regards,
JosueNovember 6, 2014 at 11:03 pm #347442This reply has been marked as private. -
AuthorPosts
- The topic ‘Add code to a specific page (Google Adwords Conversion Tracking)’ is closed to new replies.