Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #695274

    Hi.

    I was asked to add a PPC ad tracking script to my site’s header:

    Can you please show me where I should add it in the header file. I’m using Enfold and have the child theme installed.

    Thanks!

    #695370

    Hey mattb1169,

    Please try this in your child theme’s functions.php file:

    function add_custom_script_header(){ ?>
    <script async src=”//90117.tctm.co/t.js”></script>
    <?php
    }
    add_action('wp_head', 'add_custom_script_header');

    Regards,
    Rikard

    #695593

    That broke the site!

    Help! I need to get this fixed ASAP

    Parse error: syntax error, unexpected ‘?’ in /home/content/p3pnexwpnas07_data01/48/2475548/html/wp-content/themes/enfold-child/functions.php on line 8

    Please advise!

    #695634

    I’ve restored a back up of the site, all good. Still would like to add that dynamic ad tracking script? Any suggestions as to where to put that?

    #695741

    Hi!

    Please copy the code from the forum message and not the email

    function add_custom_script_header(){ ?>
    <script async src="//90117.tctm.co/t.js"></script>
    <?php
    }
    add_action('wp_head', 'add_custom_script_header');

    I have changed it.
    Do and let us know if we can do anything else for you

    Cheers!
    Basilis

    #695763

    Thanks Basilis, will give it a shot tonight.
    -M

    #695905

    Hi,

    Ok great, let us know how you get on with it.

    Regards,
    Rikard

    #696047

    Thanks Rikard,
    Everything installed and no issues with the site. Our SEO guy is confirming script is working today.

    Best,
    M

    #696320

    Hi,

    Great, glad to hear that :-)

    Please let us know if you should need any further help on the topic.

    Regards,
    Rikard

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.