mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 14:50:27 +00:00
Added time of day to tracking page.
This commit is contained in:
@@ -157,6 +157,17 @@ func GetPlatform(startDate, endDate time.Time) *pirsch.VisitorStats {
|
||||
return analyzer.Platform(&pirsch.Filter{From: startDate, To: endDate})
|
||||
}
|
||||
|
||||
func GetVisitorTimeOfDay(startDate, endDate time.Time) []pirsch.TimeOfDayVisitors {
|
||||
visitors, err := analyzer.TimeOfDay(&pirsch.Filter{From: startDate, To: endDate})
|
||||
|
||||
if err != nil {
|
||||
logbuch.Error("Error reading visitor time of day statistics", logbuch.Fields{"err": err})
|
||||
return nil
|
||||
}
|
||||
|
||||
return visitors
|
||||
}
|
||||
|
||||
func sumVisitors(stats []pirsch.Stats) int {
|
||||
sum := 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user