Like a wolf in sheep's clothing, Google, as an Alphabet subsidiary, offers the Google Analytics online service for website traffic analysis. Although the website operator superficially reaps the primary benefits from this free service – which is why many companies add the Google script without closer examination – this does involve handing over a large amount of visitor data voluntarily to Google.
Focus on User Data
In addition to the free search engine, Alphabet offers the free Gmail email service, as well as Google Docs, a wide range of free office applications. The question is where the money comes from that gives the group the financial means to offer all its products free of charge. The answer is very simple: advertising.
To personalize and play out advertising in a better more targeted way, the group needs to know more about the user. What is the best way to discover the user's name, gender, and age? By offering a free service that requests precisely these data: Gmail. It is not just that Google gains knowledge of your personal data; Google's policies also allow it to examine email traffic. Google has built a habitat with all of its offerings, in which the collected data can be linked: the Google account. When you log in, you are providing a concentrated bundle of information. Often, users don't bother to log out of their Google accounts so that all searches carried out in Google are linked to the specific user account.
Free Services for Enterprises
The above offers are aimed primarily at individuals rather than companies. Of course, it is interesting for Google to know, with the ulterior motive of targeted advertising, who is looking for the company and who the company's customers are. What could be better than receiving the required data from the website visitors directly from the website operator itself? And this takes us nicely to Google Analytics.
To convince a company to provide the desired data, Google offers free and detailed statistics about website visitors in return. The whole process can also be easily integrated into your own website as a short script. There are virtually no obstacles in the way of taking advantage of the offer. However, there is a reverse side to the coin: Visitors to the website have no way to defend themselves against this kind of data collection. Operators may reveal the details in the legal section, but few visitors are likely to read that, and if they do, it is often too late and data has already been recorded.
Opt-Out Not User-Friendly
The negative connotations of Google Analytics has now reached the minds of Internet users. Users can defend themselves against having their surfing habits recorded by rejecting the transfer of data to Google Analytics before visiting an Internet site. This is done in the form of a small browser add-on that prevents running of the Google Java script.
The problem is that this plugin is not available for every browser. Especially on mobile devices, this approach will not work. This situation led to the obligation to offer an internal opt-out solution in 2013. If you are already using Google Analytics, you are obliged to give the visitors the possibility of opt-out – a link that lets users reject the acquisition of data by Google. And this has to work regardless of the type of the browser.
Statistics on the Basis of AWStats
But, because such an opt-out often hurts businesses more than it helps them, we have looked at alternatives for extensive web statistics. Of course, you have a legitimate interest in discovering at what time people visited your website, what the search term was, and how long they stayed on the site. And, it is also interesting to know in which subpages, product offerings, and landing pages visitors are particularly interested.
This data is delivered by statistics programs, for example, on the basis of information every web server stores: the access log files. The software prepares the very large files so that the desired information is straightforward and easy to read. The disadvantage of such a software tool is that it needs to be installed on the web server and have access to the log file of the web server service.
As an example, we looked at AWStats. The freely available script, written in Perl, offers simple analysis of log files. The solution is not confined to web servers, but also analyzes mail and FTP log files. You can pick up the latest version on the website . Alternatively, AWStats is already integrated as a package in various Linux distributions. There are different ways of installing. We selected a Ubuntu installation as the operating system on which Apache was already running as the web server. You start the installation at the command line with the following command:
# apt-get install awstats
Ubuntu may complain about missing Perl packages and propose to install them. Confirm by saying
After the installation, you need to configure AWStats. To do so, open the
/etc/awstats/awstats.conf file with an editor of your choice, such as vi or JOE. In the line with the
LogFile = entry, enter the full path to the
access.log file, for example,
/var/log/apache2/access.log. You can also use different placeholders to set up file names with date entries or read all log files in a directory using a wildcard. Then, you enter the log file format: where
LogFormat = 4 means an Apache log file. If you are using AWStats on IIS on Windows, the value for LogFormat is 2.
In the next line, enter the domain name. For example:
Below HostAliases, enter the alternative domain names that you want to evaluate via the specified log file. As an example, the entry could look like this:
HostAliases = "admin-magazine.com http://www.sparkhaus-shop.com http://www.linux-magazine.com/"
Leave all the other settings as they are for your first steps. Only the "skiphosts" entry is of interest. There you enter the IPs or domain names from which requests originate that you want to exclude from the statistics. It makes sense, for example, not to record your own page hits, which inevitably occur if you need to maintain the data via a CMS. If your company has a static IP, you would enter it here:
You can alternatively also specify a DynDNS name or a combination of multiple entries. Then, the entry would look like this, for example:
SkipHostst = "adminmag.dyndns.org 220.127.116.11"
Specifying the SkipFiles variable is equally interesting. It lets you exclude certain files from the access statistics. This could be, say, a file that regularly queries an external monitoring service. Regex parameters are allowed here.
Finally, you need to add AWStats to the cronjob so that the dashboard automatically updates. For example:
*/10 * * * * root /usr/lib/cgi-bin/awstats.pl -update > /dev/null
could be the entry in the crontab.
Setting up Access to the Statistics
You access the statistics through a website. But for the server to actually display the page, you first need to configure a virtual host for Apache2. Go to
/etc/apache2/sites-available/000-default.conf in an editor, and enter the information in Listing 1 before the final VirtualHosts tag.
Listing 1: Configure a virtual host for Apache2
01 Alias /awstatsclasses "/usr/share/awstats/lib/" 02 Alias /awstats-icon/ "/usr/share/awstats/icon/" 03 Alias /awstatscss "/usr/share/doc/awstats/examples/css" 04 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 05 ScriptAlias /awstats/ /usr/lib/cgi-bin/ 06 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Then, restart Apache service with
apache2 restart and access the statistics using
in a browser of your choice. An example would be:
You should protect the page with a htaccess file so that only authorized users can view the data.
Free Evaluation with Histats
If the installation is not to your liking, or if you have no options for installing AWstats or a similar program on the web server, you can use alternative web statistics. Two representatives of online statistics suppliers are Histats  and Stetic . They differ in that Histats is free of charge for up to 10 million clicks per day, whereas Stetic is generally subject to a charge. Stetic is a German product that stores its data on servers in Germany.
To use Histats for your own site, simply access the website and sign up. Then add the website you want to capture by clicking + Add a website. Now enter the URL and language. Set the time zone of the website and the category. Then enter a title and a page description. Optionally, you can enter the starting value of the counter for page views and visits. Then it is important to ensure the visibility of statistics on "Site stats are visible only to you" because otherwise anybody can gain insights.
Statistics in Real Time
You need to add the "Statistics in Real Time" option to all the pages of your website. It is used to collect information about visitors to the site. Click on the statistics of the page after setting up and then top right on Counter CODE. On the new page, click on Add new counter and then choose the counter design. People used to love displaying how many visitors already visited the website, but now it's more the reserve of private offerings.
Once the code is built into your site, Histats displays the statistics in real time. To see this, call the statistics page of the domain in the dashboard. At the center, you will see a chart showing you the access stats. Above, you'll see the absolute numbers in real time (Figure 2). For example, the real-time display of visitors online right now is interesting. On the left, you can navigate in the menu to see detailed information about your visitors. Here you can also see the referrer, that is, the page from which your visitor came. This is very useful for tracking the impact of advertising links on various sites.
Stetic with more Counter Codes
The commercial solution by Stetic GmbH is another alternative. To get started, go to the website and click on Free trial. This is the best way to determine whether the offer meets your needs over a period of 14 days. The account you create can be used later on in a commercial version, and no data is lost. Enter your details including the URL you want to capture and click on Create account now. After logging into the dashboard, you will see the installation page directly. Compared to other suppliers, the manufacturer has a wider range of options for building the counter code into your own page (Figure 3).
There are no pre-built modules for capturing in the Plentymarket ERP product. However, Stetic has detailed instructions on how to integrate the tracking code into the parts of the program.
For companies that offer their own iOS apps, the integration method might be interesting if you want to analyze user behavior in the app. Integrating an iOS library means that you can acquire both the app events and the user events. The manufacturer again offers a very detailed guide for integration.
Interaction Thanks to Pop-Ups
Although Stetic, like Histats, advertises statistics in real time, it did take some time until we saw the first reports in the project. However, these results are far more revealing than those offered by competitors. On top of the classic page statistics, evaluations of breadcrumbs are just as interesting as the additional tools that Stetic also offers.
To start, go to the Tools menu and choose a tool, for example, Targeting. This option makes it possible for you to control the display of HTML elements on your website based on certain rules and visitor behavior. For example, you can set up a pop-up that appears if the user has been inactive on your site for some time.
Click on Create new item now and enter a name. In the Design tab, define the appearance. Choose the colors and text, and whether the element appears in full screen mode or as a sidebar or pop-up, and what size it is. Then, specify the event type, such as call to action, newsletter registration, Facebook like button, iFrame call, or HTML code. Under Targeting, you can then determine when the notice appears. For example, you can set it to appear if the visitor is inactive for 30 seconds or there is a danger of a jump off.
We also liked the fact that Stetic supports site operators on the subject of data protection. In the dashboard, you an click on the Privacy menu item to see a proposal for a privacy notice that you can display on your website. The manufacturer even provides a link for revoking the data storage opt-in. If a visitor to your website clicks on this link, he or she is opting out of anonymous user data storage in Stetic. This approach is better than having to install a browser extension for Google Analytics or to write your own opt-out code in each case.
Google Analytics provides comprehensive and detailed statistics. The service is superficially free, but website operators pay for the use of the tool with data from their site visitors and with the details of how their visitors use the website. It is understandable that visitors do not see this data transfer in a positive light. There are, however, several alternatives to Google Analytics. If you do not want to save your visitors' data on third-party servers, you can turn to self-hosted web statistics. If you do not have access to the web server, you can still acquire extensive server statistics that deliver information about the visitors of your website from alternative providers.