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

    Hi Enfold Team,

    I have a bit of problems to get my page confirmed in the google webmaster console.
    I have paste the analytics code – provided by Google – in the theme settings. Analytics is already active and take trackings.

    When I check the source code of my page it shows that Enfold is putting the google scipt NOT in the header.

    Did I made an easy mistake ? Or how to get the code in the header ?

    See you
    Markus

    #998876

    Hey MarkusLange,

    I can see the code in the footer area. Make sure you’re not logged in, otherwise you might not see the code. If you want to add it to the head section, use this code and place it into the functions.php:

    
    
    function avia_custom_head_javascript() {
        ?>
    <!– Global site tag (gtag.js) – Google Analytics –>
    <script async src='https://www.googletagmanager.com/gtag/js?id=UA-1059009-17'></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    
    gtag('config', 'UA-1059009-17');
    </script>
        <?php
    }
    add_action('wp_head', 'avia_custom_head_javascript');
    

    Best regards,
    Dude

    #998900

    Hey Dude,

    1) I did what you suggetsed and it worked out perfectly !!!! BIG Thank You

    2) I would suggest that this should go in the next update – Google wants it in the header

    For now – Topic closed

    Thanks from Kenya
    Markus

    #998986

    Hi Markus,

    Great, glad we could help and thanks a lot for the feedback. I’ll close this for now, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Google Analytics Code into Header’ is closed to new replies.