The Sitecore Analytics can be somewhat of a black box. All we know is that Sitecore stores everything about a site visitor in a Contact object and stuffs it into MongoDB when the visitor session expires.
A while ago my colleague Lasse Pedersen gave me the following scripts to be executed in RoboMongo to debug and see what Sitecore does know about my contact. The script is especially useful when working with named contacts. Replace the IDENTIFIER_NAME with the name of your contact and run it inside RoboMongo:
identifier = db.Identifiers.findOne({_id: /IDENTIFIER_NAME/i}); contact = db.Contacts.findOne({_id: identifier.contact}); classifications = db.ClassificationsMap.findOne({_id: contact._id }); userAgents = db.UserAgents.find({_id:{$in: classifications.Classificators.UserAgents}}); devices = db.Devices.find({LastKnownContactId: contact._id}); interactions = db.Interactions.find({ContactId: contact._id});
So what does the scripts return?
CONTACT IDENTIFIER
This is just the identifier information.
CONTACT
This is the complete Contact object, including all the Contact Facets that you have added yourself.
CONTACT CLASSIFICATIONS
This is the data that helps Sitecore identify if the current contact is a human or a robot.
CONTACT USERAGENTS
Here you will find the reference to the user agent data, and the information as to whether the contact was indeed identified as a human or a robot.
CONTACT DEVICES
A device is essential the cookie that was used when the user interacted with the website. Sitecore will use these data to merge contacts as it links one Contact to every device used.
CONTACT INTERACTIONS
This is each interaction that the contact have had with the website.
MORE TO READ:
Pingback: Sitecore contact cannot be loaded, code never responds | Brian Pedersen's Sitecore and .NET Blog