Help us shape the future of Go! Take the 2026 Go Developer Survey

mixpanel

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: MIT Imports: 9 Imported by: 0

README

go-mixpanel

Mixpanel GO interface

Install

$ go get github.com/housinganywhere/go-mixpanel

How to use this lib:

Init the library

You need to init the library with your mixpanel token. Then, you can use this object to access to public methods.

import mixpanel "github.com/housinganywhere/go-mixpanel"

mixModel := mixpanel.Constructor("YourMixpanelProjectToken")

If you want to send a custom context to the module in order to have some timeout in the request you can add it to the model.

mixModel.ctx = yourContext
Track Events
arguments := map[string]interface{}{
    "you": "can",
    "use": "all the",
    "arguments": "you want",
}
mixModel.TrackEvent(ctx, "YourEventName", "YourDistinctID", arguments)

License

MIT © 2019 HousingAnywhere

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

Model Public interface to access to public methods

func New added in v1.1.0

func New(token string) Model

New return a new instance of the Model of mixpanel

func (Model) TrackEvent

func (model Model) TrackEvent(ctx context.Context, event string, distinctID string, properties map[string]interface{}) error

TrackEvent send events to mixpanel distinctID: unique ID to identify this kind of requests properties: map[string]interface{}

type Private

type Private interface {
	// contains filtered or unexported methods
}

Private interface where all the external lib call exists

type Public

type Public interface {
	TrackEvent(ctx context.Context, event, string, distinctID string, properties map[string]interface{}) error
}

Public interface where all the public methos exists

Jump to

Keyboard shortcuts

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