Hello,
We have article page where we are using EPiServer Find track() method to track the statistic detail for search phrase and we are using Ajax call in controller to pass search term and call EPiServer Find search functionality to fetch the results. When we change the browser setting to Do not track without adding the below code not to track either in main action method or ajax json method, it doesn't record that particular search phrase in statistics details and obeys DNT.
string doNotTrackHeader = this.Request.Headers.Get("DNT");
if (doNotTrackHeader == null || doNotTrackHeader.Equals("0"))
{
var search = search.track();
}
Please help us understand why is it respecting DNT without adding this code when it is ajax and required this code when it passes through main action method within MVC controller.