analytics

package
v0.0.0-...-0542089 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCampaign

func AddCampaign(urlStr, campaign, content, medium string) (string, error)

AddCampaign adds Google Analytics campaign tracking to a URL and returns that URL.

func Start

func Start(deviceID, version string) *session

Start starts the analytics session with the given data.

Types

type Engine

type Engine interface {
	End(vals url.Values) url.Values
	GetEndpoint() string
	SetIP(vals url.Values, ip string) url.Values
	SetEventWithLabel(vals url.Values, category, action, label string) url.Values
	GetSessionValues(version, deviceID, execHash string) url.Values
}

func New

func New() Engine

func NewGA

func NewGA() Engine

type NullSession

type NullSession struct{}

func (NullSession) End

func (s NullSession) End()

func (NullSession) Event

func (s NullSession) Event(string, string)

func (NullSession) EventWithLabel

func (s NullSession) EventWithLabel(string, string, string)

func (NullSession) SetIP

func (s NullSession) SetIP(string)

type Session

type Session interface {
	SetIP(string)
	EventWithLabel(string, string, string)
	Event(string, string)
	End()
}

Jump to

Keyboard shortcuts

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