---
title: Enabling activity tracking
---

> 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).

> **Info:** **Kentico EMS required**
>
> Features described on this page require the **Kentico EMS** license.

To allow tracking of activities for [contacts](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/working-with-contacts.md), you need to:

1. Open the **Settings** application.
2. Navigate to **On-line marketing** and ensure that the **Enable on-line marketing** setting is checked for your website.
3. Navigate to the **On-line marketing -> Contact management -> Activities** and enable the **Log activities** setting.
4. Enable or disable logging of specific [activity types](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/tracking-contact-activities/reference-activity-types.md) using the other settings in the category.
5. **Save** the settings.

You can additionally configure logging of activities for specific pages, users and certain features. The system only tracks activities within a given scope if all related settings are enabled. See the sections below for more information.

If you only need to log activities on specific pages, consider [enabling activity tracking on these pages](#enabling-activities-for-specific-pages) only.

## Changing activity logging interval

By default, the system batch-processes activities every 10 seconds. If your system processes a large number of activities, you may want to increase the interval.

1. Open your project's web.config file.
2. Add the following .config key into the _appSettings_ section of the file. Modify the value to reflect how you want to raise the activity processing interval.

   ```csharp title="Processing activities every 30 seconds"

   <add key="CMSProcessContactActionsInterval" value="30" />

   ```
3. Save the file.

> **Info:** **Tracking file downloads**
>
> The system can track file downloads as _Page visit_ activities for files stored as pages of the _CMS.File_ type in the content tree of a website. The **Track file downloads (cms.file) for these extensions** setting in the **General** section specifies which types of files the tracking includes.
>
> Enter the allowed file types as a list of extensions separated by semicolons, for example: _pdf;docx;png_
>
> If left empty, the system tracks all file types.

## Enabling activities for specific pages

You can enable or disable logging of page-related activities (e.g. _Page visit_, _Landing page_ or _Content rating_ activity types) for individual pages on your website.

1. Select the page representing the page in the **Pages** application.
2. Open the **Properties -> General** tab.
3. In the **On-line marketing** category, enable the **Log on-line marketing activity** property.
   - If the **Inherit** field is checked, the page loads the value from the parent page.
4. Click **Save**.

By default, pages inherit the value of the **Log on-line marketing activity** property from their parent page. This state allows you to configure activity logging for all pages on the website through the root page.

### Selecting the logging method for page activities

The system provides two different ways of logging activities related to website traffic (_Page visit_ and _Landing page_):

| Processing activities on every web request                                                                                   | Using JavaScript                                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Advantages**:<br>Provides statistics for all types of web requests.                                                        | **Advantages**:<br>Filters out activities 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>May log irrelevant activities for non-human contacts such as web crawlers, RSS readers and other bots. | **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>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. Switching to JavaScript logging does not reduce the performance of the website.

To enable JavaScript logging:

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

> **Note:** **Note**: The **Log via JavaScript snippet** setting also determines how the system logs [web analytics](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/web-analytics.md).

## Disabling activity logging for users

By default, the system tracks activities for all contacts. You can disable activity tracking for the [user accounts](https://docs.kentico.com/k10/managing-users.md) of registered users.

1. Open the **Users** application.
2. Find and **edit** () the given user account.
3. Switch to the **Settings** tab.
4. Disable the **Log activities** property.
5. Click **Save**.

The activities performed by the registered user will no longer be recorded.

## Enabling activity logging for specific applications

You can choose whether the system logs the related [activity types](https://docs.kentico.com/k10/on-line-marketing-features/managing-your-on-line-marketing-features/contact-management/tracking-contact-activities/reference-activity-types.md) for individual instances of the following applications:

| Application     | Related activity types                                                                                                                                                      | To enable/disable activities                                                                                                                                                                            |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Email marketing | Subscription to a newsletter<br>Unsubscription from a single email feed<br>Opted out from all marketing emails<br>Opened marketing email<br>Clicked link in marketing email | Open the **Email marketing** application on the **Email feeds** tab.<br>**Edit** () an email feed.<br>Switch to the **Configuration** tab.<br>Enable the **Log on-line marketing activities** property. |
| Forums          | Forum post<br>Forum post subscription                                                                                                                                       | Open the **Forums** application.<br>**Edit** () a forum group or specific forum.<br>Switch to the **General** tab.<br>Enable the **Log on-line marketing activity** property.                           |
| Message boards  | Message board comment<br>Message board subscription                                                                                                                         | Open the **Message boards** application.<br>Switch to the **Boards** tab.<br>**Edit** () a message board.<br>Switch to the **General** tab.<br>Enable the **Log on-line marketing activity** property.  |
| Polls           | Poll voting                                                                                                                                                                 | Open the **Polls** application.<br>**Edit**() a poll.<br>On the **General** tab, enable the **Log on-line marketing activity** property.                                                                |
