I've used Google Analytics on my websites for some time. It's very full featured analytics package and is indispensible if you are also using Google Adwords. But you don't need to be using Adwords to get the best out of it - far from it. Anyone with a website and a willingness to share visit statistics with a third-party should probably get hooked up to Analytics sooner or later.
I'll assume that anyone reading this already has an Analytics account, and quite possible, a DotNetNuke website. If not, there is plenty of information on the internet about these two free technologies - but you'll need a website and analytics account to follow the example. So I'll cut straight to the chase: I've developed a DotNetNuke module which gives you quick integration of Google Analytics with DotNetNuke.
How to hook up Google Analytics to your DotNetNuke Website
Step 0: Create and/or locate your login details for your Google analytics account. If you haven't already got an account, follow the instructions on the Analytics site to create an account and website profile
Step 1: Download the Module install file from the DotNetNuke Downloads page on this site. (link opens in new window)
Step 2: Install the module by using the 'Module Install' functionality in your DotNetNuke portal. To check that the module installed correctly, it should appear in the 'module' drop down list in your Control Panel, under the name "iFinity Google Analytics".
Step 3: Go to the home page of your DotNetNuke portal, and use the 'Add New Module' functionality to add an instance of the iFinity Google Analytics module to the page. I normally use the bottom pane to keep it out of the way of other modules. Don't be worried that you can see the module in 'Edit' mode. The module will dissappear when you log out as Administrator.
Step 4: Click on the 'Settings' control for the Google Analytics module you just created. Then scroll the Settings page until you get to the 'Advanced Settings' section, and check the 'Display Module on All Pages'. This ensures that all pages on your website are tracked by Google Analytics.
See the red highlighted area:
Advanced Settings Section of DotNetNuke module
If for any reason you didn't want all pages on your site to be tracked, you can just copy the module from the home page onto the pages you want tracked. Scroll further down the page, expand the 'Page Settings' section until you get to the 'Basic Settings' section, and select Visibility: None, and make Display Container unchecked. This hides the Google Analytics module from visitors.
See the red highlighted area:
Basic Settings Section of DotNetNuke module
Step 5: Scroll down the page further until you reach the 'Analytics Script Generator Settings' section. Under here is the specific settings for your site. Leave this page for a minute and open up a new browser window to go to Google Analytics.
Step 6: Go to Google Analytics at http://analytics.google.com (make sure you sign in with your account) and click on 'Edit' next to the website profile you have set up. This will bring up the details of the website profile. Then find the 'check status' link on the page and click that. You should see a box containing some javascript. Instead of copying out all the javascript as directed, you only need the account number, or the 'UA' number. Copy the UA number from the Google Page into your DotNetNuke site, in the 'Google Analytics Tracking ID' field. You do not need the inverted commas around the number.
See the following example:

Analytics Settings Section of the DotNetNuke Module
Step 7: (optional) If you'd like to restrict tracking so that it doesn't show on the reports for certain visitors, you can select a DotNetNuke security group in the next drop down list. For example: you don't want the administrative editing to show up as page hits on Google Analytics. In that case, you would select 'Administrators' as the group to exclude from tracking.
Step 8: Click on Update. The page should refresh and return to the home page of your site. If you do a "view source" on your browser, and scroll to the bottom of the html, just before the body tag you should see the generated script. (NOTE : if you selected the adminstrator group, you'll have to sign out first).
Step 9: Go back to your Google Analytics account. It should still be on the page showing the tracking code to be added. Click on the 'finish' button at the bottom. When it returns to the website profile page, you should see a green tick and the words 'Receiving Data'. If you do see this, your site is providing statistics to Analytics and you are all set.
Advanced Options
The security group option is there so that any editing and other administrative activity doesn't show up on the analytics reports. However, if you wanted to separate out usage for, say, registered vs non-registered users, you can set up two profiles in Analytics and create two Analytics modules in your DotNetNuke site. You can then set one to track unregistered users by excluding registered users and vice versa. The other box on the setting page is the 'Do not generate tracking script for calls to this host'. This option allows you to interrupt calls to Google when the site is called using a specific host-name. I normally use this so that when running testing on localhost, I'm not bothering the Google server. However, instead of totally hiding the code, all that happens is that the urchinTracker() javascript call is commented out, so you can still check that it is working.
So how does it work?
If you want to know the technical details, the source code is included with the module. But for a high level intro, all that happens in the module is the collection of the module settings (UA-id, security groups and host name). The code determines if tracking should be done for the incomign request and checked against those variables. If the answer is yes, some javascript is inserted using the 'RegisterClientScript' ASP.NET call. And that's it.
Update
This product has been updated since this blog entry was written. See the Google Analytics Module for DotNetNuke page for details.
Support
Please use the Google Analytics Module Support Forums to request support and assistance.