count

package
v0.0.0-...-0384813 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive()

Archive aggregates data into daily totals

func CreateBrowserTotals

func CreateBrowserTotals(since string)

CreateBrowserTotals aggregates screen data into daily totals

func CreateLanguageTotals

func CreateLanguageTotals(since string)

CreateLanguageTotals aggregates screen data into daily totals

func CreatePageviewTotals

func CreatePageviewTotals(since string)

CreatePageviewTotals aggregates pageview data for each page into daily totals

func CreateReferrerTotals

func CreateReferrerTotals(since string)

CreateReferrerTotals aggregates screen data into daily totals

func CreateScreenTotals

func CreateScreenTotals(since string)

CreateScreenTotals aggregates screen data into daily totals

func CreateVisitorTotals

func CreateVisitorTotals(since string)

CreateVisitorTotals aggregates visitor data into daily totals

func Pageviews

func Pageviews(before int64, after int64) int

Pageviews returns the total number of pageviews between the given timestamps

func RealtimeVisitors

func RealtimeVisitors() int

RealtimeVisitors returns the total number of visitors in the last 3 minutes

func TotalReferrers

func TotalReferrers(before int64, after int64) int

TotalReferrers returns the total # of referrers between two given timestamps

func TotalUniqueBrowsers

func TotalUniqueBrowsers(before int64, after int64) int

TotalUniqueBrowsers returns the total # of unique browsers between two given timestamps

func TotalUniqueLanguages

func TotalUniqueLanguages(before int64, after int64) int

TotalUniqueLanguages returns the total # of unique browser languages between two given timestamps

func TotalUniqueScreens

func TotalUniqueScreens(before int64, after int64) int

TotalUniqueScreens returns the total # of screens between two given timestamps

func Visitors

func Visitors(before int64, after int64) int

Visitors returns the number of total visitors between the given timestamps

Types

type Point

type Point struct {
	Label           string
	Value           int
	PercentageValue float64
}

Point represents a data point, will always have a Label and Value

func Browsers

func Browsers(before int64, after int64, limit int) []Point

Browsers returns a point slice containing browser data per browser name

func Languages

func Languages(before int64, after int64, limit int) []Point

Languages returns a point slice containing language data per language

func PageviewsPerDay

func PageviewsPerDay(before int64, after int64) []Point

PageviewsPerDay returns a slice of data points representing the number of pageviews per day

func Referrers

func Referrers(before int64, after int64, limit int) []Point

Referrers returns a point slice containing browser data per browser name

func Screens

func Screens(before int64, after int64, limit int) []Point

Screens returns a point slice containing screen data per size

func VisitorsPerDay

func VisitorsPerDay(before int64, after int64) []Point

VisitorsPerDay returns a point slice containing visitor data per day

type Total

type Total struct {
	ID          int64
	PageID      int64
	Value       string
	Count       int64
	CountUnique int64
	Date        string
}

Total represents a daily aggregated total for a metric

func (*Total) Save

func (t *Total) Save(Conn *sql.DB, table string) error

Save the Total in the given database connection + table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL