<?php
/* Prohibit direct script loading */
defined('ABSPATH') || die('No direct script access allowed!');

//phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript -- add tracking script to header ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=
<?php echo esc_html($measurement_id, 'wpmsPro') ?>"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', '<?php echo esc_html($measurement_id, 'wpmsPro') ?>');
</script>
<!--End WPMS Google Analytics 4 property tracking js code-->