DotNetNuke, ASP.NET, Web Development Blog

Setting up SmarterStats against a multi-portal DotNetNuke installation

Log Based Analytics provide a new perspective

We use Google Analytics extensively for tracking and analyzing website statistics. It does a great job of providing really useful information in a way that anyone can understand. Plus, its very easy to setup and has the power to let advanced users segment and drill down through the data to get even more detailed information. But, we've found it's a good idea to get another view of your visitors and traffic using a tool that provides information based on Log Analysis. Log based analytics let your see things that simply can't be tracked by script-based analyzers like Google Analytics.

As a big fan of SmarterMail, we decided to give SmarterStats a try. We've been using SmarterStats for awhile on several of our bigger sites but we also wanted to be able to use it on a few of our portals where we have multiple sites installed on a single instance of DotNetNuke. Before we could do this, we needed to do several things first to get this to work right...

If you have a DotNetNuke installation that only has a single portal or a portal along with child portals, skip to the section on Dynamic Pages with SmarterStats, you won't need to follow the Host Header sections.

Setting up IIS 7 to include Host Header info in the logs

You have to make sure the IIS is including the host header information in the logs it creates and then you have to setup SmarterStats to only analyze hits with that host header.

You can either do this for all sites by doing it at the server level or you can just do it for one particular site.

  1. In IIS 7, click on the server or the particular site you want to change
  2. Click on the Logging icon (under the IIS section).
  3. In the Log File section, click the Select Fields... button
  4. Check the box next to "Host (cs-host)" and click the OK button

Setting up SmarterStats to only show stats for one host header

In SmarterStats, you'll need to setup a separate Stats site for each website you want to track. Then, follow these steps for each stats site in order to only see the stats for that particular site.

  1. As an admin for the Stats site, goto the Settings and then select Site Importing
  2. Select the Import Filtering tab
  3. Click the Add Inclusion or Exclusion button
  4. For Type, Select Include a Host Header
  5. For Host Header, enter your site's address, i.e. www.mysite.com

Dynamic Pages with SmarterStats

At this point you'll probably notice that none of the reports are breaking out page views the way you would expect. This is because, DNN is serving most pages from /default.aspx. So, you need to help SmartStats parse out your pages by doing two things

First, you need to setup the dynamic page filter. To do this,

  1. Go into the Stats site's "Settings" area and click on Site Importing
  2. Click on the Dynamic Pages tab
  3. Click the Add Dynamic Pages button
  4. For Match Type select "Contains",
  5. For page, type default.aspx
  6. For Query String Variables, enter tabid.
  7. Hit the Save button

Now you need to setup Page Aliases

  1. Under Site Settings, click on Page Aliases
  2. Click on the New button
  3. For the Page, use this format, /default.aspx?tabid=219
  4. For Alias, you can type whatever you like (i.e. "Home" or "/default.aspx"). This is what will display in the page reports
  5. Repeat steps 2-4 for each page.

Comments

Gravatar
Paul Says:
5/20/2011 2:42:56 PM
David we need a little consulting utilizing smarterstats in multitennent environment to provide some reports back. Would you be interested....
Gravatar
Keston Says:
11/24/2011 5:40:11 AM
isn't there a better way to view friendly url's? With a 500+ page website the Alias solution isn't do-able...
Gravatar
Rob Says:
3/26/2011 2:59:13 AM
Hi, thanks for posting this. I've got it all sorted according to the info, but how exactly do I view stats for different sites in the same DNN instance? Can I add host headers for all of the different domains at step 5 or can I only have a single domain? The stats currently look the same as they did before - no domains are visible and the results are for everything.
Gravatar
Salem Says:
11/11/2011 12:47:01 AM
I really like smartertools especially for my donetnuke website. Have installed it correctly but till have a big issue with it. Mainly that the page views are not viewing properly as the visitors are higher, which is not logical. This issue occurs on a dotnetnuke websites only due to page rendering issues. The main issue to manually add Page Aliases for each page is quite a job especially if one has many pages and is continually updated and new pages added. Is there a way to add Page Alias on the fly ? i.e. without manually adding any page alias Kindly advise.
Gravatar
Ryan Henri Says:
6/7/2024 10:35:26 AM
Hi there, I’m Ryan H., Chief Marketing Officer at Software Pro. Our CEO, Hamid Mahmood, recently hosted an event in Saint Louis, and we’d love to connect with you while he’s still in town. We’re interested in learning about your onboarding process for vendors and if you’re currently hiring external vendors. With offices in NYC and STL, we can support your business needs effectively. At Software Pro, we specialize in digital lead generation, e-commerce sales, web, and mobile development, and offer ongoing support for digital marketing, software development, and IT consulting. Could we set up a call or meeting to discuss this further? Schedule a time using this link please. https://calendly.com/hamidmahmood/ Looking forward to connecting! Best regards, Ryan Henri. Chief Digital Officer, Software Pro E: ryan@softwarepro.nyc P: +1 646 603 8944 A: 420 Lexington Ave, Grand Central Office Suites, Suite 300, New York, NY 10170 11627 Denny Rd, Saint Louis, MO 63126
Gravatar
David O'Leary Says:
3/26/2011 10:03:03 AM
Rob, you need to add a stats site for each portal that you want to track and then follow the instructions for each site. So, if you have 5 portals that you want to track, you'll set up a stats site for each portal and set it up to Include the Host Head for each separate portal.
Gravatar
David O'Leary Says:
10/31/2012 4:46:05 PM
If this is a feature you need, it's probably wise to re-enforce the need for this on this thread: http://forums.smartertools.com/showthread.php/29043-Dotnetnuke-on-SmarterStats-and-Page-Aliases
Gravatar
David O'Leary Says:
10/31/2012 4:24:31 PM
I've submitted feature requests for improvements to SmarterTools. Also take a look at this topic for options for making DNN/IIS write the friendly URL to the Log. http://www.dotnetnuke.com/Community/Community-Exchange/Question/2508/Is-there-any-way-to-have-human-friendly-URLs-written-to-IIS-logs.aspx
Leave a Comment
Gravatar
Name:
Email: (not displayed)
Comments:

CAPTCHA image
Enter the code shown above:
Website

Return to previous page
  Search Articles...