Could anyone please help me with an issue I am having, I need to use C# to return the most searched for terms to put into some html. I have an on-premise Standard SharePoint 2013 environment and for my code so far I have the following:

public void getSearchedItems()
        string siteurl = SPContext.Current.Site.Url;
        string weburl = SPContext.Current.Web.ServerRelativeUrl;

        using (SPSite site = new SPSite(siteurl))
            SPServiceContext context = SPServiceContext.GetContext(site);
            SearchServiceApplicationProxy searchProxy = context.GetDefaultProxy(typeof(SearchServiceApplicationProxy)) as SearchServiceApplicationProxy;
            AnalyticsItemData usageData = searchProxy.GetRollupAnalyticsItemData(Guid.Empty, site.ID, Guid.Empty);


The issue I an having is with the 'AnalyticsItemData' I am getting a no overload for method 'GetRollupAnalyticsItemData' I have tried multiple methods for this but I keep getting the same error.

If anyone could give me any advice on where I am going wrong or how best to do this it would be greatly appreciated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.