Tag: Usage Analytics

S

SharePoint 2013: Log Analytics through javascript

The following code snippet will help you to log the usage analytics into ULS://Log Views usage event on URL of catalog item    window.LogViewsToEventStore = function(url, site)    {            SP.SOD.executeFunc("sp.js", "SP.ClientContext", function()        {            var spClientContext = SP.ClientContext.get_current();            if(!$isNull(spClientContext))            {                    var spWeb = spClientContext.get_web();                    var spUser = spWeb.get_currentUser();                    var spScope = "{00000000-0000-0000-0000-000000000000}";                      ...