Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1486841

    Why do you load the Google Analytics tracking code in the footer? It needs to be in the header for proper tracking.

    #1486914

    Hey dburton77,

    Thank you for the inquiry.

    It’s not necessarily required for the tracking code to be placed in the header, but if that’s what you need, you can add this code to the functions.php file.

    function ava_move_tracking_code_to_head() {
        remove_action( 'wp_footer', 'avia_print_tracking_code', 10000 );
        add_action( 'wp_head', 'avia_print_tracking_code', 10 );
    
    }
    add_action( 'init', 'ava_move_tracking_code_to_head', 20 );

    Best regards,
    Ismael

    #1486931

    Thank you, Ismael.

    Will the theme function to disable GA tracking still work with this approach?

    #1486956

    Hi,

    We haven’t tested that, but we don’t see any reason why it wouldn’t work with these changes. Please feel free to reach out if you encounter any issues with the privacy options.

    Best regards,
    Ismael

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