Web tracking
The Sitecore Web Tracker enables you to track and identify contacts and their interactions during their visit to your Content Delivery (CD) instance. You can use this information for:
-
Personalization of content based on behavior during the current session.
-
Historic personalization of content-based behavior during previous sessions through the The Key Behavior Cache and the Contact Behavior Profile.
-
Reacting to activities such as goals triggered during the current interaction.
-
Creating reports on site use.
-
Optimizing your website.
Remember to consult the Sitecore information about GDPR and contacts rights to object to tracking and processing.
Data collection
The Web Tracker is responsible for collecting contact activity and, and the end of the session, submitting it to a conversion pipeline that converts it and submits it to xConnect using the xConnect Client API.
-
The Web Tracker collects page views and events as objects such as
Sitecore.Analytics.Model.Entities.IContact,
Sitecore.Analytics.Tracking.CurrentInteraction
, andTracker.Current.Interaction
in the session. -
When the session ends, the Web Tracker passes an
args.TrackerVisitData
object to a conversion pipeline where multiple processors in the following order convert it into XConnect objects:-
A processor inspects the
args.TrackerVisitData
object. -
A processor converts the
args.TrackerVisitData
object into facets, properties, or events in the form ofargs.XConnectContact
andargs.XConnectInteraction
objects. The processor do not convert custom values by default. You must create a custom processor to do this work. -
A processor deletes the original
args.TrackerVisitData
object. Data collected by the tracker but not converted is lost forever. -
A processor submits the XConnect objects to the xConnect Collection service which stores them in the xDB Collection database for further processing.
-
-
When the contact returns for a new session, contact and interaction data from previous sessions is loaded from xConnect.
See the following topics for more information about tracking known and anonymous contacts, and how to identify a contact in a session:
Untracked pages
The Web Tracker do not track pages that are listed in the tracking/untrackedPages
node in the App_Config/Sitecore.config
file on the Content Delivery (CD) role. By default, the list consist of service pages:
<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>
There is also a tracking/untrackedPages
node in the Sitecore.Analytics.Tracking.config
file. Sitecore merges the two nodes when it reads the config files.
If your Sitecore installation has other pages likes the service pages, you can prevent them being tracked and avoid that they create irrelevant data in your reports. Examples of such pages are keepalive pages, or pages you use for registering system events.
Pages are referenced by their relative URLs, and we recommend that you add pages using patch files instead of editing the config files directly.
You can access the list of untracked pages programatically through the UntrackedPages
property of the Sitecore.Analytics.Configuration.AnalyticsSettings
class.
Trackable data
You can track the following data, but remember to inform the contacts of what you are doing:
|
|
|
---|---|---|
Contacts |
Yes | |
Interactions |
Yes | |
Browser information (name and version) |
Yes | |
Campaigns |
Yes | |
Channels |
Yes | |
Engagement value |
Yes | |
Goals |
Yes | |
IP Geolocation |
Yes | |
Multivariate tests |
Yes | |
Operating system |
Yes | |
Page events |
Yes | |
Pages viewed |
Yes | |
Profile values |
Yes | |
Referrer |
Yes | |
Screen height/width (where available) |
Yes | |
Search keywords |
Yes | |
Start date/time and end date/time |
Yes | |
User agent |
Yes | |
Outcomes |
Yes |
-
Page events and Goals are both triggered in the same way programmatically.
-
The Web Tracker does not track programmatically enabled items by default. You must enable tracking in Content Editor or in the code to gather information about these items.