analytics

package
v1.42.6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analytics

type Analytics struct {
	Integrations []Integration `json:"integrations,omitempty"`
}

func (Analytics) SnippetJSON

func (a Analytics) SnippetJSON() []byte

Only JSON encode enabled integrations

func (Analytics) UpdateShownDisabledStatus

func (a Analytics) UpdateShownDisabledStatus() Analytics

func (Analytics) UpdateStoredDisabledStatus

func (a Analytics) UpdateStoredDisabledStatus() Analytics

type Custom

type Custom struct {
	Code string `json:"code,omitempty"`
}

Integration specific properties

type FacebookConversions

type FacebookConversions struct {
	Value    string `json:"value,omitempty"`
	Currency string `json:"currency,omitempty"`
}

type FacebookPixel

type FacebookPixel struct {
	Values Values `json:"values,omitempty"`
}

type GoogleAdWords

type GoogleAdWords struct {
}

type GoogleAnalytics

type GoogleAnalytics struct {
}

type Heap

type Heap struct {
}

type Integration

type Integration struct {
	Name      string `json:"-"`
	Disabled  bool   `json:"-"`
	Disabled_ *bool  `json:"disabled,omitempty" datastore:"-"`

	// Common to all integrations
	Type          string `json:"type"`
	Event         string `json:"event,omitempty"`
	Id            string `json:"id,omitempty"`
	IntegrationId string `json:"-"`

	// Sampling percentage
	Sampling float64 `json:"sampling,omitempty"`

	// Available integrations
	Custom
	FacebookConversions
	FacebookPixel
	GoogleAdWords
	GoogleAnalytics
}

type Sentry

type Sentry struct {
}

type Value

type Value struct {
	Percent float64        `json:"percent,omitempty"`
	Value   currency.Cents `json:"value,omitempty"`
}

Override value for a given event

type Values

type Values struct {
	Currency         currency.Type `json:"currency,omitempty"`
	ViewedProduct    Value         `json:"viewedProduct,omitempty"`
	AddedProduct     Value         `json:"addedProduct,omitempty"`
	InitiateCheckout Value         `json:"initiateCheckout,omitempty"`
	AddPaymentInfo   Value         `json:"addPaymentInfo,omitempty"`
}

Event specific value overrides

Jump to

Keyboard shortcuts

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