Analytics tracking
Identify and track contacts that come to your website.
Analytics tracking enables you to identify and track contacts so you can see all their activities on your website. You can use this information gathered by tracking contacts during current and past web sessions for personalization, reporting and optimizing your website.
The analytics tracker refers to the classes in the Sitecore.Analytics
assembly that you use for tracking. When a contact triggers tracked events on a website, they are stored in the tracker during the active session and then saved to the interaction in xDB when the session ends.
To enable tracking, you need to register the activities that you want to track, such as goals, outcomes, or page events. To do this, you need to associate the activity with a content item. For example, you can associate a campaign with a specific page on your website. When a contact visits this page, the campaign is triggered and recorded in the interactions for the contact.
You can enable tracking:
Automatically
You can use the Content Editor to associate goals, campaigns, page events or other activities to be triggered automatically and tracked in the system.
Programmatically
You can associate goals, campaigns, page events or other activities to be triggered programmatically during a web session and tracked in the system.
The Sitecore.config
file has a node called tracking/untrackedPages
. Sitecore does not track files that are listed in this node. By default, these files are not tracked:
<tracking> <untrackedPages> <add path="/sitecore/default.aspx" /> <add path="/sitecore/service/error.aspx" /> <add path="/sitecore/service/Heartbeat.aspx" /> <add path="/sitecore/service/keepalive.aspx" /> <add path="/sitecore/service/nolicense.aspx" /> </untrackedPages> </tracking>
Files are referenced by their relative URLs. There is also a tracking/untrackedPages
node in the App_Config\Include\ Sitecore.Analytics.Tracking.config
file. Sitecore merges the nodes when it read the config files.
The recommended way to add files is using patch files instead of editing the config files directly. This file describes the include file patch process.
If you remove entries from the list, Sitecore starts collecting data about these pages. The list consists of "service" pages that will not produce meaningful data.
If your Sitecore installation has other pages likes this, you can add these pages to the list and avoid that they create "noise" in the reports. Examples of such pages are “keepalive” pages, or pages you use for registering system events (error, user opened email, and so forth)
You can access the list of pages that are untracked in code by using the UntrackedPages
property of the Sitecore.Analytics.Configuration.AnalyticsSettings
class.
During each interaction the tracker collects data on all the trackable activities of the contact and holds this data in the current session. The tracked content is held in Tracker.Current.Interaction
until the session ends.
You can use data collected during tracking in several different ways:
Personalization
The tracker collects activities such as pages viewed and goals triggered that you can use for personalization during the current web session.
Historical personalization
The Key Behavior Cache and the Contact Behavior Profile enables you to use tracked data from past web sessions to personalize content.
Retrieving marketing data programmatically
You can use tracking data to retrieve data about contacts and the activities they triggered during a session, for example, to get information about all the goals triggered during the current interaction.
You can retrieve data programmatically for all of the following activities:
Goals
Campaigns
Contact Behavior Profile
Note
Page events and Goals are both triggered in the same way programmatically.
You can track the following:
Trackable data | System enabled tracking | Content Editor/Programmatically enabled | |
---|---|---|---|
Contacts |
| ||
Interactions |
| ||
Browser information (name and version) |
| ||
Campaigns |
| ||
Channels |
| ||
Engagement value |
| ||
Goals |
| ||
IP Geolocation |
| ||
Multivariate tests |
| ||
Operating system |
| ||
Page events |
| ||
Pages viewed |
| ||
Profile values |
| ||
Referrer |
| ||
Screen height/width (where available) |
| ||
Search keywords |
| ||
Start date/time and end date/time |
| ||
User agent |
| ||
Outcomes |
| ||
Engagement automation states |
|
Note
The system does not track programmatically enabled items by default. You must enable tracking in the code or in the Content Editor to gather information about these items.