6

I'm currently trying to identify a contact using

Sitecore.Analytics.Tracker.Current.Session.Identify(user)

and an exception keeps being thrown

"this.Contact should not be null".

Debugging confirms that Tracker.Current.Session.Contact is indeed null. All the blog posts and Sitecore documentation I've read, mention nothing about Contact possibly being null when identifying a contact. This is all being run in an httpRequestProcessed pipeline.

What are the possible reason to get the contact as null in current session?

1 Answer 1

9

Make sure it runs before the Sitecore.Analytics.Pipelines.HttpRequest.EndAnalytics processor in the httpRequestProcessed pipeline. Otherwise, the contact is set to null in the EndAnalytics pipeline by Sitecore.Analytics.Pipelines.EndAnalytics.ReleaseContact processor.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.