Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1318667

    Need to place a Tracking tag/pixel on select pages of our website. Are there detailed instructions on how to do this within Enfold or can someone direct me on how to do this?

    Thank you..

    #1318846

    Hey Maureen or Shari,
    Thank you for your patience as I understand your question you have some tracking code that you only want to add to the header of certain pages, in that case try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function add_select_page_tracking(){
        if(is_page(array(42, 21, 85))) {
    ?>
    //Put Your Tracking Code Here
    <?php
        }
    }
    add_action('wp_head', 'add_select_page_tracking');

    you will need to replace //Put Your Tracking Code Here with your code and replace the array numbers with your page IDs.
    If you want the code to load in your footer then change wp_head to wp_footer

    Best regards,
    Mike

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