(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-20117591-5', 'auto'); ga('send', 'pageview'); function GA4(url, GA) { // Adding the script tag to the head as suggested before var head = document.head; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = url+GA; // Then bind the event to the callback function. // There are several events for cross browser compatibility. script.onload = GA4Layer(GA); // Fire the loading head.appendChild(script); } function GA4Layer(GA) { window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', GA); } GA4("https://www.googletagmanager.com/gtag/js?id=", 'G-DR75SVFJFZ');