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
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
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