January 5, 2017

Read visitor profile details in Sitecore

We can read visitor’s personal details in Sitecore.

if (Sitecore.Analytics.Tracker.Current.Contact != null)
  {
    var personalFacet =    Tracker.Current.Contact.GetFacet<IContactPersonalInfo>("Personal"
);
    if (personalFacet != null
)
    {
       
if (personalFacet.FirstName != null
)
        firstName = personalFacet.FirstName;
    }
  }

No comments:

Post a Comment