The first phase of a User Analytics Data Gathering and Reporting Module, here with a description of User Analytics Logging
User Analytics - It All Begins With Data Gathering
Before we can enjoy the fruits of a robust user analytics reporting module we need some data to work with, so the Sueetie User Analytics Gathering and Reporting Module begins with user request logging which we will describe here. Let's begin with a few definitions.
- User Analytics Gathering and Reporting User Analytics is also known as Web Traffic Analytics, looking at what our users are doing, learning what they are interested in by what they are viewing on our site. Communities are all about their members, not pages, so the Sueetie Analytics package is called Sueetie USER Analytics.
- User Request Logging This describes the "gathering" component of User Analytics Gathering and Reporting. In logging user requests, every time a visitor views a Sueetie Web Page we are logging select information to our database for later analysis. This also enables real-time analytics reporting. By "select information," we're logging select information to give us a wealth of information unique to the Sueetie Environment and its applications. User Request Logging will supplement existing and new activity logging to come to form more complete analysis reports. Existing logging includes items like the creation of new posts and forum messages, registrations and logins, wiki page updates, etc.
What we are Logging
The Sueetie Analytics Logger gathers data unique to the Sueetie Environment, and
only Sueetie-specific data. That is to say that the Analytics Logger doesn't record elements like browser type, user IP address or referral page. If you need more ubiquitous traffic reporting, then free analytics engines like Google Analytics will handily do the job...and store all of that data! Sueetie prides itself on being small, lean and fast, and that includes database size.
Here is an excerpt of the Sueetie Report Log listing the data that is being recorded on each user page load.
Logging Intelligence Factors
As you can see there are only a few fields here, but they give us everything we need. The key intelligence factors are the fields PageID, UserID and ContentID.
- PageID When the page request is loaded into SQL, the RawUrl is compared against a list of existing urls in the table Sueetie_ReportPages. If it exists, that pageID is used to key that request item, if not it is created for use for the existing request and all future requests for that page. This eliminates redundant storage of the url.
- UserID This of course tells us which user is visiting the site and what they are interested in. The anonymous userID is -1.
- ContentID This gives us the biggest bang for the buck. All Sueetie Content from any application is part of the Sueetie Data Core architecture with identifying properties for application, application type (media, blog, etc), content type (blog post, photo media album, document media album, forum topic, etc.), and so on. Support pages like the site home page or login page would have contentID of "0" as they do not represent a content item page like a blog post would or a forum topic.
Types of Reports this Data Will Enable
The data being logged by the Sueetie User Analyzer will support a wealth of different analysis reporting. A few which immediately come to mind are:
- Most Active Community Members
- Site Activity for a selected member to date or for a select date range
- Most Popular Page to date or for a select date range
- Activity for a featured page
- Pages most viewed by non-members
- If select members have visited a featured page and to follow-up accordingly by another channel if desired
- More accurate information on inactive users
- More granular activity reporting by blog post, forum topic, media album, CMS page, Marketplace Item, etc
- Since Sueetie Marketplace is tied into Analytics, centralized download data and store activities (like "email this item to a friend" type functions)
- Recording of administrative activity in all applications
- More that I haven't thought of
How Sueetie Analytics Logging is so Fast
Before implementing analytics logging it was essential that the process of logging to the database was lightning fast. To ensure there would be no effect on performance, analytics logging is designed to occur on a background thread using a Fire and Forget pattern via a "self completing delegate wrapper." You can read
more about it here, but the main point to remember is that the logging data is sent to a background thread where nothing is returned making execution immediate and not affecting site performance whatsoever.
Sueetie Analytics Going Forward
I wanted to make sure the Sueetie Analytics Logging Module was available in the next version of Sueetie to start gathering data for reporting to follow. The sooner we started collecting data the sooner we could do fun stuff with it in other words. Sueetie Analytics Reporting will be a separate Add-On, so will not be tied to a specific release of the Sueetie Framework.
There will no doubt be a few changes to the logging process in the short term, as early log analysis makes it clear that we'll need to have a checklist for pages we do not wish to log, like the ScrewTurn Wiki Editor Page Refresh load for instance. I also plan on adding the ability to turn logging on or off.