<?php
/** @var \Dotdigitalgroup\Email\Block\Tracking $block */
/** @var \Dotdigitalgroup\Email\Helper\Data $helper */
?>
<?php $helper = $this->helper(\Dotdigitalgroup\Email\Helper\Data::class); ?>

<?php if ($block->isPageTrackingAvailable()) : ?>
    <script>
        require.config({
            paths: {
                'dmpt':  "<?= $block->escapeUrl($helper->getPageTrackingUrl()) ?>"
            }
        });
    </script>
    <script type="text/x-magento-init">
        {
            "*": {
                "dmpt": {}
            }
        }
    </script>
<?php endif; ?>