2016-10-04 45 views
4

当点击链接到我的Sitecore网站的链接时,我预计填写Tracker.Current.Interaction.Referrer。但事实并非如此。 我知道有情况,你没有得到一个推荐人:https://stackoverflow.com/a/6880668/1797792Tracker.Current.Interaction.Referrer为空

奇怪的是,HttpContext.Current.Request.UrlReferrer.Host确实包含引用我的情况。那么为什么Sitecore Tracker没有意识到这一点?更重要的是,我如何让它知道?

+0

Tracker.Current.Interaction.Referrer在Sitecore.Analytics.Pipelines.CreateVisits.ParseReferrer处理器中初始化。但是使用了HttpContext.Current.Request.UrlReferrer,并且你写道它是空的。尝试在httpRequestBegin管道开始处添加处理器,并检查UrlReferrer是否存在。如果它包含referrer,请检查Fiddler(或其他嗅探器)中的请求标头。 – Anton

回答

0

原来,如果您来自不同的推荐人,Tracker.Current.Interaction不会重置。它保存在会话中。 它只设置Tracker.Current.Interaction.Referrer如果Tracker.Current.Interaction == null

关闭浏览器,然后单击来参照该网站的链接上,将填补Tracker.Current.Interaction.Referrer像预期。