<?php if(isPluginEnabled('custom_code')): ?>
    <!-- Start Custom code -->
    <?php echo plugin('custom_code')->custom_code->value; ?>

    <!-- End Custom code  -->
<?php endif; ?>

<?php if(isPluginEnabled('google_analytics')): ?>
    <?php
        $tag = plugin('google_analytics')->measurement_id->value;
    ?>
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo e($tag); ?>"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', '<?php echo e($tag); ?>');
    </script>
    <!-- End Google tag (gtag.js) -->
<?php endif; ?>

<?php if(isPluginEnabled('google_tag')): ?>
    <!-- Google Tag Manager -->
    <script>
        (function(w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime(),
                event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0],
                j = d.createElement(s),
                dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src =
                'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', '<?php echo e(plugin('google_tag')->container_id->value); ?>');
    </script>
    <!-- End Google Tag Manager -->
<?php endif; ?>



<?php if(isPluginEnabled('hotjar')): ?>
    <!-- Hotjar Tracking Code-->
    <script>
        (function(h, o, t, j, a, r) {
            h.hj = h.hj || function() {
                (h.hj.q = h.hj.q || []).push(arguments)
            };
            h._hjSettings = {
                hjid: <?php echo e(plugin('hotjar')->site_id->value); ?>,
                hjsv: 6
            };
            a = o.getElementsByTagName('head')[0];
            r = o.createElement('script');
            r.async = 1;
            r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
            a.appendChild(r);
        })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
    </script>
    <!-- End Hotjar Tracking Code-->
<?php endif; ?>

<?php if(isPluginEnabled('tawk')): ?>
    <!--Start of Tawk.to Script-->
    <script type="text/javascript">
        var Tawk_API = Tawk_API || {},
            Tawk_LoadStart = new Date();
        var site_id = '<?php echo e(plugin('tawk')->property_id->value); ?>';
        (function() {
            var s1 = document.createElement("script"),
                s0 = document.getElementsByTagName("script")[0];
            s1.async = true;
            s1.src = 'https://embed.tawk.to/' + site_id + '/default';
            s1.charset = 'UTF-8';
            s1.setAttribute('crossorigin', '*');
            s0.parentNode.insertBefore(s1, s0);
        })();
    </script>
    <!--End of Tawk.to Script-->
<?php endif; ?>
<?php /**PATH /home/onemail/public_html/resources/views/partials/plugins.blade.php ENDPATH**/ ?>