{{define "app_analytics"}}{{template "top" .}} {{if .Flash}}{{end}} {{if .FlashErr}}{{end}} {{template "appnav" .}} {{template "lognav" .}}

Analytics

{{if .AnalyticsErr}}{{end}} {{if not .AnalyticsWin.On}}

Analytics is off for this app (from the {{.AnalyticsWin.Setting.CountFrom}}). When on, the edge counts HTML page views and daily visitors as it serves them: no JavaScript, no cookie, no stored IP. A visitor is a salted hash that changes every day. Turn it on for this app or for the whole account on the Settings tab.

{{end}}
{{with .AnalyticsWin}}
Page viewsVisitors{{if ne $.AnalyticsRange "today"}} (daily visitors, summed){{end}}Bytes servedBots excludedDropped
{{.Sum.PV}}{{.Sum.Visitors}}{{.Sum.Bytes}}{{.Sum.Bots}}{{.Sum.Dropped.Flush}}
{{if .ChartBars}} {{range .ChartBars}}{{.Label}}: {{.Value}}{{end}} {{if eq $.AnalyticsRange "today"}}per hour, UTC{{else}}per day{{end}}; peak {{.ChartMax}} {{end}} {{range .Sum.Days}}{{if .Restarted}}

{{.Date}}: counts since the last flush may be missing (the edge restarted that day).

{{end}}{{end}}

Top pages{{if .Sum.PagesApprox}} approximate: more than 500 distinct keys{{end}}

{{template "kvtable" .Sum.Pages}}

Top referers{{if .Sum.ReferersApprox}} approximate{{end}}

{{template "kvtable" .Sum.Referers}}

Named events{{if .Sum.EventsApprox}} approximate{{end}}

{{template "kvtable" .Sum.Events}}

Countries

{{with geoCountries .Sum.Countries}}
{{range sortedKV .}}{{end}}
{{geoLabel .Key}}{{.Value}}
{{else}}

No country data for this period.

{{end}} {{range geoAttributions .Sum.GeoSources}}

{{.Text}}

{{end}} {{end}}

Times are UTC. The same view from a terminal: carlos analytics --app {{.AppName}} --range {{.AnalyticsRange}}.

{{template "bottom" .}}{{end}} {{define "kvtable"}}{{if .}}
{{range sortedKV .}}{{end}}
{{.Key}}{{.Value}}
{{else}}

Nothing yet.

{{end}}{{end}}