Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PageViewHitType measure page views PageViewHitType = "pageview" // ScreenViewHitType measure sceen views in apps ScreenViewHitType = "screenview" // EventHitType measure any kind of event EventHitType = "event" // TransactionHitType measure e-commerce transactions TransactionHitType = "transaction" // ItemHitType measure items related to e-commerce transactions ItemHitType = "item" // SocialHitType measure activities on social media SocialHitType = "social" )
Variables ¶
This section is empty.
Functions ¶
func AddReporter ¶
func AddReporter(r ReportFunc)
AddReporter appends a ReportFunc to the array of uploaders that are called in turn
func TrackEvent ¶
TrackEvent post an event to analytics
func TrackPageView ¶
TrackPageView posts a pageview event to analytics
Types ¶
type ClientRequest ¶
type ClientRequest struct {
IP string
Host string
Request string
UserID string
Fingerprint string
UserAgent string
}
ClientRequest identifies a user, client request etc
func CreateClientRequest ¶
func CreateClientRequest(request *http.Request) *ClientRequest
CreateClientRequest returns a ClientRequest struct
type Event ¶
type Event struct {
Type string // hit type
Timestamp int64 // timestamp the event was created
Client *ClientRequest
Values map[string]string // k/v pairs of event data
}
Event contains, well, events
type ReportFunc ¶
type ReportFunc func(*Event)
ReportFunc is the func interface used implement various 'uploaders'
Click to show internal directories.
Click to hide internal directories.