REGISTER
 
Using Google Anaytics in DotNetNuke

Profit Metaphor - by Konstantin InozemtsevThose who use the built-in "Site Log" of DotNetNuke know how insufficient this data is. We have lots of options, like purchasing a specialized module or using a conventional site log analyzer.

As an emerging tool, Google Analytics presents yet another solution for site usage and traffic analysis. We're using it since August 2007. Here we share our views and experiences on Google Analytics.
What is Google Analytics?

Google Analytics is a free service offered by Google that generates detailed statistics about the visitors to a website (Wikipedia).

Google Analytics

It's not as powerful as high-end web analysis systems such as "WebTrends", but has some other advantages besides being free.

GA (Google Analytics) displays a dashboard page (a snapshot) for basic users and some detailed reports for professionals.

On the dashboard page, you see most of the significant traffic figures such as "unique visitors", "average time on site" and "bounce rate". There's also a globe map showing your visitors' distribution on the world.
How to use Google Analytics with DNN?

Unfortunately, use of GA within a DotNetNuke portal is not straightforward, because you have to insert a script to your HTML code. Not only the home page, all the pages you want to analyze.

As we do not deal with static HTML pages in DNN, this turns out to be a problem.


Google Analytics Script Sample
Google Analytics script sample. Here, the code UA-2500... is
artificial. The correct code is produced for you by GA.


The instructions of GA says that you should insert this script immediately before the "" tag. But it seems OK to insert it anywhere between "" and "". Maybe some old browsers may have problems running the script that way, but you miss lots of visitors anyway because "ad blocking" applications also block this script.

You have several solutions to overcome this:
  • Insert the script to the skin file
  • Insert the script within hidden Text / HTML containers
  • Use a specialized module

1Inserting the Script to the Skin File

This is the simplest and quickest solution. But it's tricky and has limitations of course. You can apply this only if:
  • You have the permission to modify portal skins
  • The skin is used only by one portal
Even if you have the permission and you have one portal with the skin, you must be careful with the "variations" of the same skin.

Most skins come with multiple variations. For example the "skin variation" of the home page may be different from inner pages. These variations are of course regarded as different skins. And in each of these different skins, you should insert the GA script.


2Inserting the Script within Hidden Text / HTML Containers

This option is rather simple but tricky.  These are the steps :
  • On your home page, add a new "Text / HTML" module. But add it to a "pane" where it will bother you less. If exists "Bottom Pane" is a good choice.
  • On the container's menu click "Edit Text" and switch to "Source" view
  • Insert the script and click "Update"
  • From the "Settings", uncheck "Display Container", and check "Display Module On All Pages?"
Now you have a container that includes your GA script that is invisible to visitors, resides in all pages and works good in most browsers. Use it with your own risk. This is the method we use in our site, and it's OK.


3Using a Specialized Module

There are quite a lot third party modules enabling to use GA with DNN. By searching for "google analytics",  on Snowcovered, you can find nearly a dozen modules designed for this task.

By the way, Snowcovered, is a neat and trustworthy site that you can purchase third party DNN modules and skins. We bought many items from them (including this skin) and we're quite happy with them.

Their prices start from 2 USD to 50 USD. Some of them just enables you to use GA in your portal, whereas others pull data from your GA account and display it on the pages.

Pros and Cons

Pros
  • Excellent look-and-feel
  • Simple to use, also scalable up to professional level
  • Free
  • Integration with "Google Ads"

Cons
  • "Ad filters" block the script, so the figures are far from accurate, you can use GA for relative performance measuring
  • Not real-time, so you should be content with one daily update
  Search
Tip of the Day
"How to bring Text/HTML module up in combo?"

Goto Host | Module Definitions. From the list find Text/HTML module and click for update. Then change it's "Friendly Name" so that it'll appear in front.

For example !Text/HTML.
Also Check These
Captain's Log
Captain's Log

As you know, dealing with DotNetNuke brings lots of unforeseen troubles and challenges.
more ...
The Funnel
DNN Module - The Funnel

"The Funnel" is a compact and yet powerful SEO (Search Engine Optimization) module that "suggests" other pages to your visitors  that would be interesting for them.
more ...
How to Install a Module?
How to Install a DotNetNuke Module?

This short article explains step-by-step installation procedure of a module. For two different versions : 4.3.x, 4.4.x.
more ...
GA Tour

Google Analytic displays a "dashboard" as a summary. You can browse around for more detailed views and reports.

First of all, GA system is full of  Search Engine Optimization jargon such as landing page, conversion, funnel etc. But GA system has lots of help pages to educate yourself.

GA Dashboard

This dashboard view is very useful for daily check. Here, you see figures like: visits, page views, bounce rate, average time on site.

Also there are charts and a globe map displaying the geographical distribution of your visitors.

GA - Distribution map of visitors

This map feature is really cool. You can even view city distribution when you click on countries.

Content Overview leads you to more reports. Even this portion on the dashboard gives useful information.

General look-and-feel of the whole system is very good. The maps and the charts are all Flash components. You can  obtain useful information when you move the mouse over charts and maps.

Mouse over info over GA map

Another cool feature is "Goal Setting". You can set goals for your conversion performance.

Conversion Goals

There's a cool method of defining funnels and directing traffic to your conversion page from any landing page.
Need Help?
This short article explains step-by-step installation procedure of a module.   Need Help?

click for details

);