Skip to content

telesink/telesink-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telesink SDK for Go

Official Go client for telesink.com — real-time event tracking.

Installation

go get github.com/telesink/telesink-go

Configuration

export TELESINK_ENDPOINT="https://app.telesink.com/api/v1/sinks/your_sink_token_here/events"

To disable (tests/dev):

export TELESINK_DISABLED=true

Usage

import "github.com/telesink/telesink-go"

telesink.Track(telesink.Event{
    Event:  "User signed up",
    Text:   "user@example.com",
    Emoji:  "👤",
    Properties: map[string]interface{}{
        "user_id": 123,
        "plan":    "pro",
    },
    // OccurredAt and IdempotencyKey are auto-filled
})

You can override the endpoint per call:

telesink.Track(telesink.Event{
    Event:    "Job succeeded",
    Text:     "ProcessUserData",
    Endpoint: os.Getenv("TELESINK_ACTIVEJOB_ENDPOINT"),
})

License

MIT (see LICENSE.md).

Releases

Packages

Contributors

Languages