110 likes | 244 Vues
Deep Dive – Web Analytics. Partners’ Webinar 06/27/2013 Karol Jarkovsky Solution Architect karolj@kentico.com. Tell Me How It Works. Advanced Configuration. Site manager Settings On-line marketing Web analytics Remember visitors by IP (minutes ) Visitor idle time (minutes )
E N D
Deep Dive – Web Analytics Partners’ Webinar 06/27/2013 Karol Jarkovsky Solution Architect karolj@kentico.com
Advanced Configuration • Site manager Settings On-line marketing Web analytics • Remember visitors by IP (minutes) • Visitor idle time (minutes) • Excluding • Excluded search engine • Excluded file extension • Excluded URLs • Excluded IP addresses • web.config/appSettings • CMSWebAnalyticsSlidingIPExpiration • Enabled by default • CMSWebAnalyticsShowFullData • Indicates whether the amount of data displayed in the analytics reports should be reduced before being rendered • Disabled by default • CMSWebAnalyticsUseMemoryStorage • CMSActivityUseMemoryStorage • Indicates whether WA should store hit logs in memory storage - CMS.WebAnalytics.MemoryStorage • CMSLogActivityImmediatelyToDB
But Is That Right? Non-human traffic impacts statistics results
But Is That Right? Adding mechanism to filter out non-human hits
Web Analytics Via JavaScript 2. Page executing async call to Kentico web service (using JavaScript) 4. Hits processed standard way 1. Server adds JavaScript snippet to page 3. Web service logs hits asynchronously
Web Analytics Via JavaScript • JavaScript snippet registered on page through CMS.UIControls.DocumentBase • GetFilePage • PortalPage: ContentPage • ~/CMSPages/PortalTemplate.aspx inherits from PortalPage • TemplateMasterPage • ASPX Master Pages inherits from TemplateMasterPage • Additonal system pages working with DocumentBase • ~\CMSModules\Newsletters\CMSPages\GetCSS.aspx • ~\CMSModules\Sharepoint\CMSPages\GetSharePointFile.aspx • DocumentBase.InitAsyncWebAnalytics() method executed on page load • If analytics enabled and JavaScript logging enabled snippet is added to the page • JavaScript snippet calls one of methods defined in WebAnalyticsService.asmx • On-site search • Banner click • On-line marketing (Landing page, Exit page, Time on page, External search, Page visit) • Page views • Browser capabilities • Visitor info (browser, mobile devices, countries, cookies, etc.) • URL Referrals • Traffic sources
Web Analytics API • Web Analytics and important API classes • CMS.WebAnalytics.HitLogProvider • LogDirectory – property that can be used to alter default storage path • LogHit() - Core analytics method logging all statistics, incl. custom • If physical log path IsExternalStoragethen machine name is added to log file name • codeName_<date>_<time>[_<machine name>].log • Info on how to create Custom Storage Provider here • CMS.WebAnalytics.HitLogProcessor • Processing physical *.log files stored in HitLogProvider.LogDirectory • Log file processed only if date and time retrieved from log file name is in the past • Processing log files and adding hit counts for statistics with the same key • siteName;culture;objectName;objectID • Storing statistics to DB in batches of 10 • CMS.WebAnalytics.AnalyticsHelper • TrackPageViewsEnabled() • AnalyticsEnabled() • Implements methods internally calling HitLogProvider.LogHit() • LogSearchKeywords() • LogReferringSite() • LogLandingPage() • …
Web Analytics API • CMS.CMSHelper.AnalyticsMethods • LogVisitor() • Tracks user visit, browser type, countries, mobile device • Visitor’s RETURNING_VISITOR status based on • IP address • Site manager On-line Marketing Web analytics Visitors Remember visitors by IP (minutes) • With CMSWebAnalyticsSlidingIPExpiration IP stored for a minute longer • Session • Cookie