<?php
/**
 * Copyright 2022 Adobe
 * All Rights Reserved.
 */

/** @var $block \Magento\GoogleGtag\Block\Ga */
/** @var \Magento\Framework\Escaper $escaper */

$analyticsData = $block->getAnalyticsData();
?>

<?php if ($analyticsData): ?>
    <!-- BEGIN GOOGLE ANALYTICS 4 CODE -->
    <script type="text/x-magento-init">
    {
        "*": {
            "Magento_GoogleGtag/js/google-analytics": <?= /* @noEscape */ $block->getAnalyticsData() ?>
        }
    }
    </script>
    <!-- END GOOGLE ANALYTICS 4 CODE -->
<?php endif; ?>
