Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SDKVersion string // This will hold the version at build time
Functions ¶
func GetVersion ¶
func GetVersion() string
GetVersion retrieves the SDK version for use in the application.
Types ¶
type Client ¶
type Client struct { APIKey string BaseURL string HTTPClient *http.Client SessionID string LastTouch time.Time SessionTimeout time.Duration AppVersion string AppBuildNumber uint64 DebugMode bool Quit bool Logger *log.Logger // Logger field added // contains filtered or unexported fields }
func NewClient ¶
func NewClient(apiKey, appVersion string, appBuildNumber uint64, debugMode bool, baseURL string) *Client
NewClient Initializes a new client and begins processing events automagically.
func (*Client) EvalSessionID ¶
EvalSessionID evaluates and updates the session ID if the session has expired.
func (*Client) NewSessionID ¶
NewSessionID generates a new session ID in the format of epochInSeconds + 8 random numbers.
func (*Client) Stop ¶
func (c *Client) Stop()
Stop gracefully stops the event processing and sends any remaining events.
func (*Client) TrackEvent ¶
TrackEvent queues an event with the specified EventData for tracking.
type EventData ¶
type EventData struct { EventName string `json:"eventName"` Props map[string]interface{} `json:"props"` Timestamp string `json:"Timestamp"` SessionId string `json:"SessionId"` SystemProps map[string]interface{} `json:"SystemProps"` }
EventData represents the structure of the event data passed to TrackEvent.
Click to show internal directories.
Click to hide internal directories.