protected string ResolveContactIdentifier(string contactId, bool isInternalRequest) { if (!isInternalRequest) { return(contactId); } ContactKeyCookie contactKeyCookie = new ContactKeyCookie(""); return(contactKeyCookie.ContactId.ToString("N")); }
public virtual void Process(IngestionPipelineArgs args) { if (args.Contact != null) { return; } if (Sitecore.Analytics.Tracker.Current == null) { Sitecore.Analytics.Tracker.Initialize(); } var cookie = new ContactKeyCookie(); if (!cookie.IsNewContact) { var contactManager = Sitecore.Configuration.Factory.CreateObject("tracking/contactManager", true) as ContactManager; if (contactManager != null) { args.Contact = contactManager.LoadContactReadOnly(cookie.ContactId); } } }