Google Analytics is one of those must-have tools when running a website. The tasks of tracking traffic sources, browser versions, search terms, etc. are all made easy. The developers of DotNetNuke have also made using Google Analytics on a DotNetNuke website simple.
Step By Step
- Add a new Text/HTML module to a page of your site, you can position it anywhere, but I recommend the bottom of the page as administrative users will still see the module when they are logged in
- Edit the text of the module to contain no text
- Enter the module settings from the SolPart Action Menu
- Expand the “Advanced Settings” section
- Check the box next to “Display Module On All Pages?”
- Now under “Page Settings” -> “Basic Settings” un-check the following boxes
- Display Container
- Allow Print
- Allow Syndicate
- Ensure that the “Cache Time” is set to 0 (Caching appeared to cause issues with this implementation in my testing)
- Click “Update” to save your changes
This should complete the setup. You may now test to ensure everything is functioning correctly. You can log out as an administrator and view your site and no extra content should be displayed however if you look at the generated source you should see your javacript listed. Google Analytics should update within about 15 minutes to show that they are receiving your data.