Jul 252014

At the time of writing this post, the new “Universal Analytics” version of the Google Analytics tracking code, based on the analytics.js javascript library, is already out of beta phase, and most webmasters need to get ready to replace, in the pages of the sites managed by them, the old “Classic Analytics” tracking code based on the ga.js library with the new code.

This post presents some considerations that need to be taken into account in performing this migration. Continue reading »

 Posted by at 10:00 am
Nov 182012

Most blogs based on WordPress are organized in categories, and every post in the blog is assigned one or several categories. OpenAlfa blog, for instance, has categories for different programming languages, data formats, etc.

But generic tools commonly used to analyze traffic in a web site, such as Google Analytics or AWStats, do not include the concept of a WordPress “category”, and therefore do not offer by default the possibility to generate reports detailed by category.

However, Google Analytics implements “Custom Variables” and “Advanced Segments”. Combining these two functionalities, we can manage to generate reports detailed by WordPress category, as explained in this post.

Continue reading »

 Posted by at 5:43 pm
Oct 122012

AWStats is a log analyzer application written in Perl, that summarizes valuable information about the traffic received by a web server, and displays it in a web frontend with data in tables and graphs.

This post explains how to install and configure AWStats in an apache web server running on a linux (Debian)  machine. The official documentation of AWStats is available at http://awstats.sourceforge.net/docs/

Continue reading »

 Posted by at 9:39 am
Apr 222012

(Read this post in spanish)

If a web site spans several subdomains (for instance, a main site ‘www.site.com’, a blog ‘blog.site.com’ and a forum ‘forum.site.com’), on one hand we may be interested in tracking each individual subdomain, but on the other hand we will be also interested in an aggregated view of the overall traffic of the domain.

This can be done in Google Analytics by defining several profiles and filters under the same account, as we explain below:

Taking our own domain ‘openalfa.com’ as example, our content resides in three subdomains:

      • www.openalfa.com
      • blog.openalfa.com
      • blog-en.openalfa.com

When we create our analytics account, it has a single profile defined. We change the name of this profile to ‘openalfa.com’ and retrieve the tracking code, specifying that we are going to track a domain with multiple subdomains:

Codigo de seguimiento de analytics para varios subdominios

If we compare this code with the one used to track a single domain, we can see that the only difference is an additional sentence:


This sentence states that the user session pertains to the domain ‘openalfa.com’, whether the pages accessed are from www.openalfa.com or from blog.openalfa.com.

Once the tracking code has been copied to all pages in all subdomains, we proceed to define an advanced filter in the main profile ‘openalfa.com’. The purpose of this filter is to add the subdomain as a prefix to all urls displayed inside Google Analytics (in this way, we will be able to distinguish, for instance, between ‘www.openalfa.com/index.php’ and ‘blog.openalfa.com/index.php’. Without this filter, both urls would appear in analytics as ‘/index.php’).

Finally, we define a new profile for each of the subdomains we want to track individually.

In each of these subdomain profiles, we create and advanced filter to include only traffic generated in the corresponding subdomain.

In the next screenshot we can see as an example the case of the filter create for the profile ‘www.openalfa.com’:

Definicion de filtro para perfil de subdominio en analytics


Next, we proceed in the same way creating profiles for the subdomains ‘blog.openalfa.com’ and ‘blog-en.openalfa.com’, and creating their advanced filters.

And that’s it !

 Posted by at 9:44 am