How to Configure Google Analytics in DotNetNuke.
There are two methods, for installing and configuring Google Analytics on your DNN site.
- Method 1 - Use if your DNN version is 5.1.0 or newer.
- Method 2 - Use if your DNN version is 4.x or older.
Method 1 - Use if your DNN Version is 5.1.0 or Newer.
- Create an account with Google Analytics first if you have not done so already. Once your account is created you should receive an account number.
- Log into your site as the SuperUser (host).
- Go to Admin > Google Analytics. If the module is not there go to Host -> Extensions -> Available Extensions and install the module.
- Configure the module with your tracking id which should be your account id and any URL Parameters you wish to add. Then click Update.
- No need to add the module to all pages as the tracking code is added to all pages by default.
Method 2 - Use if your DNN Version is 4.x or Older
- Create an account with Google Analytics first if you have not done so already. Once your account is created you should receive an account number and java script to use on your site.
- Next, log into your site as the SuperUser (host).
- Add a new HTML module a page on your site. The position does not matter but it is recommend to place it at the bottom of the page because administrators will be able to see this module when logged in.
- Edit the text of the module to contain no text.
- Access the modules settings and expand the Advance Settings section.
- Check the box next to Display Module On All Pages?
- Copy/insert your Javascript code in the Header box. This will ensure that the data is always retained.
- Expand the Page Settings > Basic Settings and un-check the following boxes.
- Display Containers
- Allow Print?
- Allow Syndicate
- Make sure that the Cache Time is set to 0 as caching has been known to cause issues.
- Click Update to save your changes.
Article ID: 1780, Created: October 10, 2012 at 3:28 PM, Modified: August 25, 2014 at 2:24 PM