11/06/2012

Removing Google Analytics from your DNN site

It's very easy to add the Google Analytics tracking code to your DotNetNuke site: Just go to Admin - Google Anaytics, enter your tracking ID and the tracking code is automatically generated for every page.

 

But what if you need to REMOVE the Google Analytics code? DNN doesn't let you replace your tracking ID with nothing in the Google Analytics page (the field is mandatory). So, you either stick with it or put an invalid value (such as "0") and have your site generate a totally invalid and useless tracking code all the time.

 

What you can do, is go to your site's root folder and find the siteanalytics.config file. That's where the tracking code is. (As of DNN version 6.2.4, this doesn't seem to have changed).

 

The problem is that if you delete this file it keeps getting regenerated. So the only way to avoid generating analytics is to keep the file but COMMENT OUT or DELETE everything inside the CDATA tag (essentially,the script tag from start to finish). This way, DNN will still see the file is there, but won't generate anything for Google to use.

 

If, at a later time, you need to restore your Google Analytics tracking code, you can either delete the file (so that it can be auto-generated again) or just uncomment what you commented.

 

Hope it helps!

Read more...

11/05/2012

Quick hints: How to ensure your site remembers your visitors' credentials so that they don't have to login every time

If you need to make life easier for your portal's registered users, you may have to make it remember them so that they won't have to retype their credentials next time they visit.

 

Making "remember me" always checked

 

By default, DNN's "remember me" checkbox on the login page is visible and unchecked. In order to make it checked by default, you'll have to edit the /DesktopModules/AuthenticationServices/DNN/Logon.ascx file (assuming DNN 6.2 but probably same in earlier versions) and find the following control:

 

<asp:checkbox id="chkCookie" resourcekey="Remember" runat="server" />

 

Add a checked="true" attribute to the control as follows:

 

<asp:checkbox id="chkCookie" resourcekey="Remember" checked="true" runat="server" />

 

And the checkbox will always be checked by default.

 

If you upgrade your DNN installation sometime in the future, you'll probably lose this setting, so keep in mind that you may have to edit the file again after an upgrade.

 

Defining the "remember me" duration

 

The second thing you should define is for how long a user will be remembered. This is controlled by a key in your web.config file, under the <appSettings> section:

 

<add key="PersistentCookieTimeout" value="0" />

 

The value expresses duration in minutes. So, if you need your portal to remember your users for, let's say, a month, that's 60*24*30 = 43200. A year would be 60*24*365 = 5252600 and so on.

 

It's important to set that value, since your "remember me" functionality may not work at all, especially in older DNN versions that are using an ASP.NET 2.0 application pool. For more details, see here and also here.

 

Ensuring that the "remember me" checkbox is enabled

Finally, if you don't see the "remember login" checkbox at all, it may have been disabled in your DotNetNuke installation. The setting to disable or enable the remember me functionality is under Host Settings - Basic Settings - Host Details - "Enable remember me on login controls" checkbox.

Read more...
Related Posts with Thumbnails

Recent Comments

Free DotNetNuke Stuff

Free DotNet Videos

  © Blogger template The Professional Template by Ourblogtemplates.com 2008

Back to TOP