woopra

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// To track events in Woopra, send Http GET requests to:
	TRACK_API_ENDPOINT = "https://www.woopra.com/track/ce"

	// Identify requests can be used to ID a visitor and/or add properties to that visitor. The endpoint is:
	IDENTIFY_API_ENDPOINT = "https://www.woopra.com/track/identify"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Tracker
	Person
	Event             string
	VisitorProperties map[string]string
	UserAgent         string
	// contains filtered or unexported fields
}

Context is an intermediate representation of concatenated track-request specific data

func (*Context) Push

func (ctx *Context) Push() *Context

Push identify a user without any tracking event

func (*Context) Track

func (ctx *Context) Track(event string, properties map[string]string) *Context

Track is tracking a custom event for identified person

type Person

type Person struct {
	Id     string
	Name   string
	Email  string
	Values map[string]string
}

Person used for identifying person (user) for upcoming tracking

type Tracker

type Tracker struct {
	Host    string
	Timeout int
}

Tracker used for storing sharable settings

func NewTracker

func NewTracker(config map[string]string) (*Tracker, error)

NewTracker creates new instance of sharable Tracker struct

func (Tracker) Identify

func (t Tracker) Identify(ctx context.Context, person Person, args ...string) *Context

Identify is used to create reusable person-specific association. Last (optional) argument is used to proxy UserAgent data to Woopra

Jump to

Keyboard shortcuts

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