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

    Hi Ismael,
    You gave me this code snippet to move the GA4 tracking code to the WP head, however, after implementing it GA tracking no longer works. Could you please investigate?

    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 );
    
    #1487215

    Hey dburton77,

    Thank you for the update.

    We may need to access the site to properly check the issue. We didn’t find any site information in the previous thread.

    https://kriesi.at/support/topic/google-analytics-loaded-in-footer/

    You can remove the code to relocate the tracking script to the footer, which is the default placement.

    Best regards,
    Ismael

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