Overview: In this article, you will learn how to enable IP anonymization in DNN Evoq Engage 9.2.0 for Google Analytics.
Environment: DNN Evoq Engage 9.2.0.
Step-By-Step Guide:
1. Go to the Persona Bar > Settings > Config Manager.
2. Use the drop-down on the configuration manager page to select SiteAnalytics.config.
3. Make a copy of the file before applying any change.
4. Update it with the below code;
<![CDATA[
<script type="text/javascript">
(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', '[TRACKING_ID]', 'auto', {'legacyCookieDomain': '[DOMAIN_NAME]'});
ga('set', 'anonymizeIp', true);
[CUSTOM_SCRIPT]
ga('send', 'pageview');
</script>
]]>
5. Click on Save.
Confirmation: Go to your site, and reload it. Click on "View Source code" option from the browser and you will see the modified script being injected in the page header section.
Priyanka Bhotika
Comments