analytics

package
v0.0.138 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MixpanelEndpoint = "https://api.mixpanel.com/track"
	MixpanelToken    = "0c1710c9656bbfb1056bb46093e23ca1"
	TRACKING_VERSION = 1
)

Variables

This section is empty.

Functions

func DeleteUserID

func DeleteUserID() error

DeleteUserID removes the persistent user ID file

func SendEvent

func SendEvent(eventType EventType, properties map[string]interface{})

SendEvent sends an event to Mixpanel with the given event type and properties

func SendEventWithUserData

func SendEventWithUserData(eventType EventType, properties map[string]interface{}, userDataFetcher func() map[string]interface{}) error

SendEventWithUserData sends an event to Mixpanel and enriches it with user data from a callback

Types

type EventType

type EventType string

EventType represents the type of event to track

const (
	EventCliInstallStarted      EventType = "cli_install_started"
	EventCliInstallSuccess      EventType = "cli_install_success"
	EventCliInstallFailed       EventType = "cli_install_failed"
	EventCliCodeInitStarted     EventType = "cli_code_init_started"
	EventCliCodeInitSuccess     EventType = "cli_code_init_success"
	EventCliCodeInitFailed      EventType = "cli_code_init_failed"
	EventCliCodePushStarted     EventType = "cli_code_push_started"
	EventCliCodePushSuccess     EventType = "cli_code_push_success"
	EventCliCodePushFailed      EventType = "cli_code_push_failed"
	EventCliDatasetParseStarted EventType = "cli_dataset_parse_started"
	EventCliDatasetParseSuccess EventType = "cli_dataset_parse_success"
	EventCliDatasetParseFailed  EventType = "cli_dataset_parse_failed"
	EventCliModelsImportStarted EventType = "cli_models_import_started"
	EventCliModelsImportSuccess EventType = "cli_models_import_success"
	EventCliModelsImportFailed  EventType = "cli_models_import_failed"
	EventCliProjectsPushStarted EventType = "cli_projects_push_started"
	EventCliProjectsPushSuccess EventType = "cli_projects_push_success"
	EventCliProjectsPushFailed  EventType = "cli_projects_push_failed"
	EventAuthLoginSuccess       EventType = "auth_login_success"
	EventAuthLoginFailed        EventType = "auth_login_failed"
	EventAuthLogoutSuccess      EventType = "auth_logout_success"
	EventAuthLogoutFailed       EventType = "auth_logout_failed"
	EventServerInstallStarted   EventType = "server_install_started"
	EventServerInstallSuccess   EventType = "server_install_success"
	EventServerInstallFailed    EventType = "server_install_failed"
	EventServerReinstallStarted EventType = "server_reinstall_started"
	EventServerReinstallSuccess EventType = "server_reinstall_success"
	EventServerReinstallFailed  EventType = "server_reinstall_failed"
	EventServerUpgradeStarted   EventType = "server_upgrade_started"
	EventServerUpgradeSuccess   EventType = "server_upgrade_success"
	EventServerUpgradeFailed    EventType = "server_upgrade_failed"
)

Jump to

Keyboard shortcuts

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