Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoSegmentIO

This Package is a simple solution for segmentio API Go binding. For the server side analysing.

Build Status

Installation

	go get "github.com/athom/gosegmentio"

Usage

Simple Usage:

package main

import (
	"github.com/athom/gosegmentio"
)

func main() {
	gosegmentio.SetSecretToken("your secrect token")
	gosegmentio.Identify("112", map[string]interface{}{
		"Name":    "Kioshi",
		"Age":     230,
		"Country": "Earth Kindom",
	}, map[string]interface{}{})

	gosegmentio.Track("112", "DeadAt", map[string]interface{}{
		"Age":      230,
		"Date":     "82 BSC",
		"Location": "Kioshi Island",
	}, map[string]interface{}{})

	gosegmentio.Track("102", "AnomynousEvent", map[string]interface{}{
		"Hey": "There",
	}, map[string]interface{}{})

	gosegmentio.Alias("102", "113", map[string]interface{}{})

	gosegmentio.Identify("113", map[string]interface{}{
		"Name":    "Roku",
		"Age":     70,
		"Country": "Fire Nation",
	}, map[string]interface{}{})

	gosegmentio.Track("113", "BornAt", map[string]interface{}{
		"Age":      0,
		"Date":     "82 BSC",
		"Location": "Fire Nation",
	}, map[string]interface{}{})

	gosegmentio.Track("113", "DeadAt", map[string]interface{}{
		"Age":      70,
		"Date":     "12 BSC",
		"Location": "Fire Nation",
	}, map[string]interface{}{})
}

Advanced(the batch feature):

Please refer the examples;

License

It is released under the WTFPL License.

About

A Go wrapper for segment.io server side analysis API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages