May23Written by:Will
5/23/2009

I finally have found some time to look at the newest version of DotNetNuke®, or in this case, the most recent Beta. The beta can be publically downloaded and participated in. One of the first things I have stumbled upon during my run through tonight was the new Google Analytics Module included in the Admin Menu. One might question the need for such a module, especially when there are commercial modules out there and a widget that accomplish the same thing. However, as I have found out, the DNN one is not at all flexible enough for prime time use.
When you login as an Administrator or above, you will see the Google Analytics page in the Admin Menu (pictured left). Clicking on the page will load the module. There are currently two fields for it: Tracking ID, and URL Parameter.
The Tracking ID is used to add the ID that is given to you by the Google Analytics website. If this value is left blank, the analytics script will not be added to the markup for the page.
The other setting, URL Parameter, is not as useful. It allows you to specify a specific URL to track your metrics under.
While, the URL Parameter is a common setting, not everyone has such a minimalist implementation of the analytics tool. We might want to take advantage of the plethora of other settings that the Google Analytics API exposes to us. I think that we should also have an additional textbox to allow us to add more GA parameters and settings, but that would also be more useful in the individual Page Settings, not in the Site Settings. In addition, passing that value through the Token Replacement engine would be twice as useful.

Entering your Google AnalyticsTracking ID and clicking save, will initiate DNN to inject the Google Analytics script into the page.

It’s that easy to use. Give it a test run yourself.
8 comment(s) so far...
Thanks for the article. The DNN contextual help for the parameter is not very clear and may lead to confusion, as to what this parameter is The DNN help texte says “Javascript code fragment that will be passed as a parameter to the page tracker” Google analytics help says “Optional parameter to indicate what page URL to track metrics under. When using this option, use a beginning slash (/) to indicate the page URL.” I think DNN should reword the contextual help to read more like Googles own explanation, this would reduce the confusion that this parameter creates.
By Claude Bourgoin on
8/24/2009 |
Thanks for your comment and reading my blog, Claude. I agree, but I think anyone who is familiar with any open source project knows, the developers do not and cannot think of everything. You have found one of those things. :)
I am sure they would love the feedback, if you'd be willing to post your suggestion in their bug tracker at: http://support.dotnetnuke.com By Will on
8/24/2009 |
I have the tracking ID set appropriately, and all was working fine for a few days...now though, it appears as though the required Javascript is NOT being injected into my pages. As far as I know, nothing else has changed. Any thoughts on what might cause this, or where to look?
Thanks!
By Chris Hyde on
8/24/2009 |
Off the top of my head, I do not know of anything in the DNN core that would make this happen, except maybe disabling jQuery. But that is a long shot. I do not believe one has anything to do with the other.
I would first look at other 3rd party modules and providers, and make sure that your settings are saved in the UI and database.
By Will on
8/24/2009 |
hello, I usually add a google analytics module to display on all pages - but that was in DNN 4.x Now in DNN 5 do I just put the code in like displayed above and it achieves the same results?
Thanks in advance Crysta
By Crysta Hammond on
11/2/2009 |
That's all there is to it. No need for another 3rd party module - unless you need something with more features.
By Will on
11/2/2009 |
Just set the Tracking ID on a site using the GA Module. Do you know if the analytics excludes by default any page views initiated from either the admin and/or the host accounts? I'll find out soon enough after a few days of traffic to the site. Don't see any URL Parameter help to see if filters could be accomplished through a parameter setting. If there is no means to filter the results in the module then, for me at least, the module has limited usefulness and I would probably look for another 3rd party solution.
By Kurt Amstutz on
4/6/2010 |
To my knowledge, it does not exclude any pages. I have not confirmed that though. DNN PE has more options for this module to do what you're saying. However, there are 3rd party providers for Google Analytics modules that do a much better job anyway.
By Will on
4/6/2010 |