<?php
// first, create the function to put your tracking code into
function add_tracking_info_to_head() {
// paste your tracking code between the ?> and <?php below – in this case it's for Google Analytics
?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-4008777-25"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-4008777-25');
</script>
<?php
}
// then, call that action by name and insert it using the WordPress wp_head hook
add_action ('wp_head', 'add_tracking_info_to_head', 99);