• Tealady46
    April 20, 2015 at 10:53 am #106672

    Hi All

    I’ve been grappling with the easiest way to add tracking code for specific pages, mainly for tracking conversions. Most of the advice is to put the code into the <head> section of the relevant page. However, this isn’t really possible for dynamically generated page.

    However, I stumbled on some great advice and tested it out for some Facebook code I needed to add and it worked, so thought I’d share it here.

    Hope this helps for anyone else who had a similar problem.

    Appearance > Editor > Functions.php

    Then just before the closing ?>
    Add the following:

    function custom_code(){
    if ( is_page( 1122 )) {
    add_action(‘wp_footer’, ‘custom_code’);

    Believe me, I have virtually zero knowledge of PHP, so it surprised that the solution ended up being so simple!!

    Deborah Plowright

    Camelia Support Team - WP Estate
    April 21, 2015 at 6:06 pm #106830

    Hi Deborah,
    Thank you for sharing this with us.
    Maybe it will help someone else.
    Thank you,

You must be logged in to reply to this topic.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.