analytics

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 3 Imported by: 0

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) FormatTime

func (c *Client) FormatTime(nanos int64) string

FormatTime converts nanos to string in same format for all analytics requests

func (*Client) NewEvent

func (c *Client) NewEvent(userID, email, eventName string, active bool, properties map[string]interface{})

NewEvent logs a new event

func (*Client) Update

func (c *Client) Update(userID, email string, active bool, properties map[string]interface{})

Update updates the user metadata

Jump to

Keyboard shortcuts

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