analytics

package
v2.6.20 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 6 Imported by: ? modules, 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 Client

type Client struct {
	// contains filtered or unexported fields
}

Client uses segment to trigger life-cycle emails (quota, billing, etc).

func NewClient

func NewClient(segmentAPIKey, prefix string, debug bool) (*Client, error)

NewClient return a segment client.

func (*Client) FormatUnix

func (c *Client) FormatUnix(seconds int64) string

FormatUnix converts seconds to string in same format for all analytics requests

func (*Client) Identify

func (c *Client) Identify(key string, accountType mdb.AccountType, active bool, email string, properties map[string]interface{})

Identify creates or updates the user traits

func (*Client) TrackEvent

func (c *Client) TrackEvent(key string, accountType mdb.AccountType, active bool, event Event, properties map[string]string)

TrackEvent logs a new event

type Event

type Event int

Event is a type of usage event

const (
	SignIn Event = iota
	AccountDestroyed
	KeyAccountCreated
	KeyUserCreated
	OrgCreated
	OrgLeave
	OrgDestroyed
	OrgInviteCreated
	GracePeriodStart
	GracePeriodEnd
	BillingSetup
	BucketCreated
	BucketArchiveCreated
	MailboxCreated
	ThreadDbCreated
)

func (Event) String

func (e Event) String() string

Jump to

Keyboard shortcuts

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