Fixes for google tag manager - hosted

This commit is contained in:
David Bomba 2023-03-12 11:39:35 +11:00
parent e2c4dd0640
commit 0330fd31db

View File

@ -2,6 +2,16 @@
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@if(\App\Utils\Ninja::isHosted())
<!-- 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','GTM-WMJ5W23');</script>
<!-- End Google Tag Manager -->
@endif
<!-- Error: {{ session('error') }} -->
@if (config('services.analytics.tracking_id'))