Documentation
¶
Index ¶
- type Analyzer
- func (a *Analyzer) Browsers(ctx context.Context, q Query) ([]Row, error)
- func (a *Analyzer) Channels(ctx context.Context, q Query) ([]Row, error)
- func (a *Analyzer) OS(ctx context.Context, q Query) ([]Row, error)
- func (a *Analyzer) Paths(ctx context.Context, q Query) ([]PathRow, error)
- func (a *Analyzer) Refs(ctx context.Context, q Query) ([]RefRow, error)
- func (a *Analyzer) Summary(ctx context.Context, q Query) (Summary, error)
- func (a *Analyzer) Timeline(ctx context.Context, q Query) ([]TimelinePoint, error)
- func (a *Analyzer) UTMSources(ctx context.Context, q Query) ([]Row, error)
- func (a *Analyzer) Visitors(ctx context.Context, q Query) (Visitors, error)
- type PathRow
- type Query
- type RefRow
- type Row
- type Summary
- type TimelinePoint
- type Visitors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer runs read-only stats queries against kiko_hits and aggregate tables.
func (*Analyzer) UTMSources ¶
type PathRow ¶
type PathRow struct {
Path string `json:"path"`
Title string `json:"title,omitempty"`
Hits int64 `json:"hits"`
Uniques int64 `json:"uniques"`
}
PathRow is a path with hit counts.
type Query ¶
type Query struct {
Host string
Since time.Time
Until time.Time
Limit int
Interval string // hour or day
}
Query holds common filter parameters for stats endpoints.
type RefRow ¶
type RefRow struct {
Referrer string `json:"referrer"`
Source string `json:"source,omitempty"`
Hits int64 `json:"hits"`
Uniques int64 `json:"uniques"`
}
RefRow is a referrer with hit counts.
type Row ¶
type Row struct {
Label string `json:"label"`
Hits int64 `json:"hits"`
Uniques int64 `json:"uniques"`
}
Row is a labeled count pair used in breakdown tables.
type Summary ¶
type Summary struct {
Host string `json:"host"`
Since string `json:"since"`
Until string `json:"until"`
Hits int64 `json:"hits"`
Uniques int64 `json:"uniques"`
TopPath string `json:"top_path,omitempty"`
TopPathN int64 `json:"top_path_hits,omitempty"`
}
Summary holds headline metrics for a site.
type TimelinePoint ¶
type TimelinePoint struct {
Period string `json:"period"`
Hits int64 `json:"hits"`
Uniques int64 `json:"uniques"`
}
TimelinePoint is one bucket in a time series.
Click to show internal directories.
Click to hide internal directories.