Enabling statistics for GNWeb

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 13:05

Since the version 1.6, you can enable statistics of the published objects in GNWeb:

Activate engine [http://devnet.kentico.com/docs/devguide/index.html?web_analytics_overview.htm here].

Create a new custom query named "Tera.gn3article.WebStat" (SiteManager/Developement/Document Types/Gn3 Article) containing:

SELECT DISTINCT ##TOPN##

  View_CMS_Tree_Joined.DocumentName as 'Name', 

  tera_gn3article.Gn3EditorialKey   as 'Key',

  Analytics_DayHits.HitsCount       as 'Hits'

FROM

  tera_gn3article,cms_document,cms_tree,Analytics_DayHits,Analytics_Statistics,View_CMS_Tree_Joined

WHERE

  ##WHERE## and

  Name <> 'ArticlePreview' and

  tera_gn3article.id = cms_document.DocumentForeignKeyValue and

  cms_document.DocumentNodeId = cms_tree.nodeid and

  View_CMS_Tree_Joined.NodeId = cms_tree.nodeid and

  cms_tree.nodeid = Analytics_Statistics.StatisticsObjectId and

  Analytics_DayHits.HitsStatisticsId = Analytics_Statistics.StatisticsId and

  cms_tree.nodeclassid = (select Classid from cms_class where classname = 'tera.gn3article')

ORDER BY hitscount DESC

Data to import:

../GN4/Main/Config/Data/GN4/dataSrcTemplate_FeedRSS_WebStat.xml

../GN4/Main/Config/Data/GN4Counters.xml

In the Publishing destinations designer Info column the number of views will be shown.

GNWeb source feed (for testing purpose):

http://localhost/GNWeb/webdo.ashx?cmd=getstats