ga

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

type Analytics struct {
	ClientID        string `json:"client_id"`
	DataSource      string
	UserIP          string
	UserAgent       string
	DocumentReferer string
	CampaignName    string
	CampaignSource  string
	CampaignMedium  string
	CampaignKeyword string
	CampaignID      string
	DocumentHost    string
	DocumentPath    string
	DocumentTitle   string
}

Analytics struct contains the information which can be sent to

type GA4Data added in v1.1.13

type GA4Data struct {
	ClientID       string
	UserID         string
	OrgName        string
	TrackingDomain string
	Hostname       string
	Keyword        string
	Location       string
}

type Queue

type Queue struct {
	SendCount  int
	ResetCount int
	CC         int // current counter
	TrackingID string

	APISecret     string
	MeasurementID string
}

Queue struct will be used to send data to GA

func (*Queue) Push

func (queue *Queue) Push(data *Analytics)

Push method will send data to analytics by using basic sampling logic

func (*Queue) PushGA4 added in v1.1.13

func (queue *Queue) PushGA4(data *GA4Data)

Jump to

Keyboard shortcuts

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