stats

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const GA_TRACK_ID = "UA-42629236-12"

Variables

This section is empty.

Functions

func Collect

func Collect(event Event)

Collect the user's stats

func GetDeviceID

func GetDeviceID() (string, error)

GetDeviceID returns the current machine's device ID

func Init

func Init() error

Types

type ClientType

type ClientType struct {
	ID           string `json:"id"`
	Platform     string `json:"platform"`
	AppVersion   string `json:"app_version"`
	AppChannel   string `json:"app_channel"`
	Distribution string `json:"distribution"`
}

ClientType is collect payload's client field type

var Client ClientType

Client is current user's client info

type Event

type Event struct {
	Event string `json:"event"`
}

Event is collect payload's evnets field type

Jump to

Keyboard shortcuts

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