---
title: Enabling web analytics
related:
  - https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/configuring-settings-for-sites/settings-on-line-marketing/settings-web-analytics.md
  - https://docs.kentico.com/k12sp/on-line-marketing-features/managing-your-on-line-marketing-features/web-analytics/viewing-web-analytics-reports.md
  - https://docs.kentico.com/k12sp/on-line-marketing-features/configuring-and-customizing-your-on-line-marketing-features/configuring-on-line-marketing-permissions.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

[Web analytics](https://docs.kentico.com/k12sp/on-line-marketing-features/managing-your-on-line-marketing-features/web-analytics.md) are disabled by default. To enable logging of analytics for your website:

1. Open the **Settings** application.
2. Select the **On-line marketing -> Web Analytics** category.
3. Check **Enable web analytics**.
4. **Save** the settings.

The other settings in the Web analytics category enable or disable tracking of individual types of statistics and events. See [Settings - Web analytics](https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/configuring-settings-for-sites/settings-on-line-marketing/settings-web-analytics.md) for details.

> **Note:** **Disk permissions**
>
> Web analytics require your ASP.NET account to have the _Modify_ permission for the _\~/App\_Data_ folder on your disk. See [Disk permission problems](https://docs.kentico.com/k12sp/installation/troubleshooting-installation-issues.md) to learn how to find the account name.

## Selecting the logging method

The system provides two different ways of logging web analytics:

| Processing analytics on every web request                                                                                                            | Using JavaScript                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Advantages**:<br>Provides statistics for all types of web requests.                                                                                | **Advantages**:<br>Filters out statistics generated by non-human tools such as RSS readers and web crawlers.<br>Provides more accurate and relevant data for most public-facing websites.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Disadvantages**:<br>Results may be skewed by non-human traffic such as web crawlers, RSS readers and other bots (typically irrelevant statistics). | **Disadvantages**:<br>Ignores users with browsers that do not support [JavaScript](http://en.wikipedia.org/wiki/JavaScript) or have it disabled (typically less than 1% of all visitors).<br>If your website uses [custom analytics](https://docs.kentico.com/k12sp/on-line-marketing-features/configuring-and-customizing-your-on-line-marketing-features/configuring-web-analytics/web-analytics-api/adding-custom-web-analytics.md), JavaScript logging does _not_ affect their functionality. This may lead to inconsistency with the default analytics.<br>May not work correctly on pages that run custom JavaScripts (if conflicts occur). The logging is compatible with all default Kentico scripts. |

> **Info:** In most cases, it is recommended to use JavaScript logging for web analytics. Switching to JavaScript logging does not reduce the performance of the website.

To enable JavaScript logging:

1. Open the **Settings** application.
2. Select the **On-line marketing -> Web Analytics** category.
3. Enable the **Log via JavaScript snippet** setting.
4. **Save** the settings.

**Note**: This setting also determines how the system logs on-line marketing [activities](https://docs.kentico.com/k12sp/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/tracking-contact-activities.md) related to website traffic.
