Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1045875
    michent1
    Participant

    Hi,
    I need to insert an affiliate tracking .js on all pages on our site.

    Here is an example of the script <script src="//www.xyz.net/am/00000/impressions/page/am.js"></script>

    Would I just put this in the customizer section?

    #1046112
    Friech
    Moderator

    Hi There,

    Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add this bit of code on your child theme’s functions.php file

    add_action('wp_head','my_tracking');
    function my_tracking () { ?>
      <script src="//www.xyz.net/am/00000/impressions/page/am.js"></script>
    <?php }

    Paste it just right after the

    // Additional Functions
    // =============================================================================

    Hope it helps, Cheers!

  • <script> jQuery(function($){ $("#no-reply-1045875 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>