Adding Google Analytics Tracking code in DNN 9.*

By: Chris Hammond
Published Date 5/5/2017
Last Updated Friday, May 05, 2017 1:22 AM

If you’ve setup a new DNN site running on version 9.0 or 9.1, you’ll notice that you don’t have the ability to setup the Google Analytics module/code anymore. For some reason, DNN Corp in its infinite wisdom decided to remove the core, critical functionality from the Platform version of DNN and only leave it in the paid versions.

Well fear not, you can easily add Google Analytics code to your pages, follow these steps.

  1. First step is to go to http://analytics.google.com/ and sign up, register your site, you’ll be given Tracking code that looks similar to

    <script>
       (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-######-##', 'auto');
       ga('send', 'pageview');

    </script>

  2. Copy that code, yours will be slightly different, without the #### in place.
  3. Navigate to your Site Settings page within the DNN Persona Bar.
  4. Navigate to the Site Behavior tab
  5. Scroll down to the Page Output Settings section.
  6. Paste the tracking code into the text box there.
  7. Click save at the bottom of the page.

Boom, you’ve now got your tracking code included on all the pages on your site.

Recent Comments

There are currently no comments. Be the first to make a comment.

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your email address so that we may contact you if necessary. We will also use this for your Gravatar.
Enter the URL to your website. URLs may be removed from comments.
Enter your comment here.
If you can't type Human in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond is

Chris Hammond is a father, husband, leader, developer and car guy. Chris has long specialized in ASP.NET and DotNetNuke development, so you will find a variety of topics here on the website. For more information check out the about me page.

If you are looking for DotNetNuke consulting please visit my business website at http://www.christoc.com/

Disclaimer

Any blog posts here are solely the opinion and views of Chris Hammond only. Comments on blog posts are the opinion of the commenter, and not Chris Hammond.

Powered By

This website is managed by Christoc.com Software Solutions

DotNetNuke Hosting

Hosting for this website is provided by AppliedI.Net. Be sure to visit them for all your DotNetNuke Hosting needs. 

Find Me