tags:

views:

24

answers:

2

We are using Sitecore OMS and I want to get the name of the visiting company (allthough I know that it is not allways accuarate) to show in a rendering. Anyone know if it is possible to question the Analytics API for this kind of information?

+1  A: 

An API for querying Analytics data doesn't (yet?) exist. Your best bet may be to use LINQ to SQL to get what you are looking for. Check out this post for something similar: http://learnsitecore.cmsuniverse.net/en/Developers/Articles/2009/09/mostviewedList.aspx

Sean Kearney
A: 

Found it by some help from this blog post!

var sessionId = AnalyticsTracker.Current.CurrentSession.SessionId;
var IPOwner = AnalyticsManager.GetIpOwnerBySessionId(sessionId);
Zooking