Golang Mixpanel Client

Overview

mixpanel

Mixpanel Go Client

Donate to 1P8ccYhVt4ByLahuVXiCY6U185gmYA8Rqf

Usage

import "github.com/dukex/mixpanel"

--

documentation on godoc

Examples

Track

err := client.Track("13793", "Signed Up", map[string]interface{}{
	"Referred By": "Friend",
})

--

Identify and Update Operation

people := client.Identify("13793")

err := people.Track(map[string]interface{}{
	"Buy": "133"
})

err := people.Update("$set", map[string]interface{}{
	"Address":  "1313 Mockingbird Lane",
	"Birthday": "1948-01-01",
})

License

Released under the MIT License.

Author

Duke X (dukex)

Issues
  • Added mocked implementation for use in unit tests

    Added mocked implementation for use in unit tests

    Hi!

    I've changed the Mixpanel struct to be an interface and added a mock implementation in addition to the current real implementation. This makes it easy to test code which uses mixpanel:

    var client mixpanel.Mixpanel = mixpanel.NewMock()
    
    people = client.Identify("1")
    people.Update("$set", map[string]interface{}{
        "custom_field": "cool!",
    })
    
    // client.People now holds the tracked data
    

    Also, functions now only return a single error and not an HTTP response, making error handling easier.

    opened by mr-andreas 2
  • Implement UpdateGroup endpoint

    Implement UpdateGroup endpoint

    Some time ago mixpanel released a new feature called "groups" (checkout: https://developer.mixpanel.com/reference/group-set-property). This PR add the ability to update such entity via this client.

    In order to avoid confusion in between the mutation of Users and Groups, i deprecated the Update endpoint and renamed it UpdateUser.

    opened by AlexisMontagne 0
  • Add Import method to be able to create events older than 5 days

    Add Import method to be able to create events older than 5 days

    The main new feature is to be able to create events older than 5 days. In order to do this, basic HTTP auth has also been added (without password as it is not required to use Import). Some other small fixes were implemented too. Mixpanel docs: https://developer.mixpanel.com/docs/importing-old-events

    opened by ubiuser 0
  • Add plumbing to allow autogeolocation on the mixpanel side

    Add plumbing to allow autogeolocation on the mixpanel side

    In short, empty Event.IP/Update.IP results in a ip=1 to be appended to the url params for people updates and events. By sending ip=1, mixpanel will automatically geolocate using the ip of the requester during the API request.


    It looks like this was the intended behavior, but unfortunately it did not work as described (https://github.com/dukex/mixpanel/blob/master/mixpanel.go#L39-L40)

    opened by tmpvar 0
  • net/http: TLS handshake timeout

    net/http: TLS handshake timeout

    Hi guys.

    I'm consuming the MixPanel API using this amazing library, but I'm getting a recurring issue:

    *url.Error Get "https://api.mixpanel.com/engage?data=xx&ip=1": net/http: TLS handshake timeout

    Can you help me with this problem, please?

    opened by ogaravito-yofio 1
Owner
Duke
28 years old, fullstack developer. Founder of @megafono
Duke
Clusterpedia-client - clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Calvin Chen 4 Jan 7, 2022
Client-go - Clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

clusterpedia.io 7 Jun 17, 2022
Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

null 0 Feb 14, 2022
Go-http-client: An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev ?? This package provides you a http client package for your http requests. Y

Furkan Bozdag 40 May 23, 2022
Client for the cloud-iso-client

cloud-iso-client Client for the cloud-iso-client. Register an API token Before using this client library, you need to register an API token under your

Virtomize 0 Dec 6, 2021
Nutanix-client-go - Go client for the Nutanix Prism V3 API

nutanix-client-go This repository contains portions of the Nutanix API client code in nutanix/terraform-provider-nutanix. It has been extracted to red

Marvin Beckers 0 Jan 6, 2022
Aoe4-client - Client library for aoe4 leaderboards etc

AOE4 Client Overview This is a go client used to query AOE4 data from either the

Mark Smith 0 Jan 18, 2022
Balabola-go-client - GO client for Yandex balabola service

Balabola GO Client GO client for Yandex balabola service Yandex warning The neur

Konovalov Maxim 0 Jan 29, 2022
Golang client for ethereum json rpc api

Ethrpc Golang client for ethereum JSON RPC API. web3_clientVersion web3_sha3 net_version net_peerCount net_listening eth_protocolVersion eth_syncing e

Andrey 234 Jun 18, 2022
A golang client for the Twitch v3 API - public APIs only (for now)

go-twitch Test CLIENT_ID="<my client ID>" go test -v -cover Usage Example File: package main import ( "log" "os" "github.com/knspriggs/go-twi

Kristian Spriggs 21 May 10, 2021
a Go (Golang) MusicBrainz WS2 client library - work in progress

gomusicbrainz a Go (Golang) MusicBrainz WS2 client library - a work in progress. Current state Currently GoMusicBrainz provides methods to perform sea

Michael Wendland 45 May 3, 2022
⚡️ SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang)

Gosip - SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang) Main features Unattended authentication using different strategies

Andrew Koltyakov 79 Jun 18, 2022
Golang client for LastPass

Go client for LastPass Features login via user name and master password two-factor authentication with out-of-band mechanism such as push notification

David Ansari 28 Jun 29, 2022
Golang client for PayPal REST API

Go client for PayPal REST API Coverage POST /v1/oauth2/token POST /v1/identity/openidconnect/tokenservice GET /v1/identity/openidconnect/userinfo/?sch

Alex Pliutau 502 Jul 3, 2022
An API client for the Notion API implemented in Golang

An API client for the Notion API implemented in Golang

Anatoly Nosov 304 Jun 22, 2022
The client of NodeStatus / Golang Version

NodeStatus-client-go The client of NodeStatus written in Golang 使用说明 请直接下载release下的对应平台的二进制文件。 运行时需传入客户端对应参数。 假设你的服务端地址是https://tz.mydomain.com,客户端用户名

神楽坂みずき 19 Jun 1, 2022
This is the GoLang ApiDQ API client

ApiDQ API GoLang Client This is the GoLang ApiDQ API client. This library allows using of the actual API version. You can find more info in the docume

Nikita Krasnikov 1 Oct 19, 2021
golang client for illumina's basespace

a REST API client communicate with Illumina's BaseSpace The easist way to get a corresponding token https://developer.basespace.illumina.com/docs/cont

Jingtao 0 Jan 10, 2022
A Golang Client Library for building Cosmos SDK chain clients

Cosmos Client Lib in Go This is the start of ideas around how to implement the cosmos client libraries in a seperate repo How to instantiate and use t

Jack Zampolin 113 Jun 18, 2022