Configuring web analytics

Web analytics provide a way to measure and later analyze key metrics of your website such as visits, page views, file downloads, traffic sources and much more.

To be able to work with metrics in the Web analytics application, you need to have the permissions for the Web analytics module.

First, you need to enable web analytics and select the logging method:

In order to correctly log incoming traffic from search engines, you need to define objects representing individual search engines:

Furthermore, you can configure which actions you want to log as custom conversions on your sites:

Additionally, you can use Web analytics API to log custom actions as conversions or add tracking of custom actions as web analytics:

You can also configure the system to automatically delete old web analytics data that is no longer needed:

If you encounter problems or unexpected behavior related to web analytics, you can use the system’s debugging functionality:

How web analytics work

When a tracked event (such as a page view, file download, etc.) occurs, the system stores a record in the application’s memory. The application then periodically writes the memory records into log files in the ~/App_Data/CMSModules/WebAnalytics folder. The names of the files use the following format: <event type>_<date>_<time>.log

Disabling memory logging for analytics

The intermediate memory storage step improves the performance of the web analytics logging on high-traffic websites. The logging does not use up a significant amount of memory, but you can configure the system to directly log analytics records into physical files if you need to fully minimize the application’s memory usage.

Add the following key to the appSettings section of the application’s web.config file:




<add key="CMSWebAnalyticsUseMemoryStorage" value="false" />


The Process analytics log global scheduled task reads the content of all analytics log files every minute (or other scheduled interval) and imports the processed data into the database. You can view the status of the scheduled task and configure its settings in the Scheduled tasks application.

Process analytics log on a web farm

If your environment is configured to run in a web farm, you need to configure the Process analytics log scheduled task to be executed on each of the web farm servers individually. See Configuring scheduled tasks to be executed on every server of a web farm.

This data is then loaded from the database and presented in an easy to read format using web analytics reports (defined through the Reporting application).

Limitations

Web analytics only track content and events related to pages managed by Kentico. It cannot track other content, such as html files or media files that are not served by Kentico.

You may notice a delay between the time that an event occurs on the website and the time the web analytics statistics are updated. All tracked events are first stored in temporary files on the local file system and need to be processed by a scheduled task.