4

When clicking on a link that links to my Sitecore site, I expect Tracker.Current.Interaction.Referrer to be filled. However, it is not. I know there are scenario's where you don't get a Referrer: https://stackoverflow.com/a/6880668/1797792

Strange thing is however, that HttpContext.Current.Request.UrlReferrer.Host does contain the referrer in my case. So why isn't the Sitecore Tracker aware of this? And more importantly, how do I make it aware?

Community
  • 1
  • 1
user1797792
  • 1,169
  • 10
  • 26
  • Tracker.Current.Interaction.Referrer is initialized in Sitecore.Analytics.Pipelines.CreateVisits.ParseReferrer processor. But there is used HttpContext.Current.Request.UrlReferrer, and you wrote that it is empty... Try to add processor at start of httpRequestBegin pipeline and check if UrlReferrer is present there. Also check request headers in Fiddler(or other sniffer) if it contain referrer. – Anton Oct 05 '16 at 08:27

1 Answers1

0

Turns out that Tracker.Current.Interaction doesn't reset if you come from a different referrer. It is saved in the session. It only sets the Tracker.Current.Interaction.Referrer if Tracker.Current.Interaction == null

Closing the browser and then coming clicking on a link referring to the site will fill Tracker.Current.Interaction.Referrer like expected.

user1797792
  • 1,169
  • 10
  • 26