What is the best way to add the new Google Analytics 4 property to a DNN site?
How do you modify the SiteAnalytics.config file to handle the google tag manager?
Hi Tycho
Yes i am aware of where to edit it, but how do i change the existing script to accomodate the new Google analytics ie google the manager
what script should I use?
My existing SiteAnalytics.config looks like this:
DotNetNuke.Services.Analytics.GoogleAnalyticsEngine, DotNetNuke Head False <ScriptTemplate><br /> <script type="text/javascript"><br /> var _gaq = _gaq || []; _gaq.push(['_setAccount', '[TRACKING_ID]']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ]]>
How do I change it to accommodate the Google Tag Manager:
<!-- Global site tag (gtag.js) - Google Analytics -->