Enable the web analytics tracking feature
Tracking is a function of Content Delivery (CD) roles that you can enable or disable depending on the role's purpose. For example, tracking serves no purpose on a CD role that exclusively provides digital assets.
You must register activities such as goals, campaigns, outcomes, page events that you want to track. You do this by associating the activities with content items. For example, you can associate a campaign with a specific page so that when a contact visits the page the campaign is recorded in the interactions for that contact.
You can use Content Editor to associate activities to be triggered and tracked automatically, or you can do it programmatically with custom code to gain more flexibility.
To enable tracking programatically:
Ensure that your layout contains the MVC helper or the
If you are using ASP.NET MVC, use the MVC helper:RequestResponseshell
@using Sitecore.Mvc.Analytics.Extensions @Html.Sitecore().VisitorIdentification()
If you are using ASP.NET Web Forms, use the
<!-- ASP.net> <sc:VisitorIdentification runat='server'/>
The package you use to install your Content Delivery role affects whether or not you can enable tracking and use limited personalization when xDB is disabled.