Skip to content
A golang implementation of the KissMetrics API.
Go
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
.gitignore
LICENCE
README.md
core_methods.go
structs.go

README.md

Kissmetrics Go

Kissmetrics Go is a KissMetrics library written in Go to help simplify the task of sending events to Kiss from your go project.

Get Started

It's really simple to get started, first we need to make sure that we have downloaded the library:

$ go get github.com/centricwebestate/kissmetricsgo

Now that we've got the library we can initialise the KM type and start sending events.

Note: The library exposes it's types and functions under the kmgo package.

package main

func main() {
	// Initialise the Go Library
    km := kmgo.NewKM("yourapikeyhere")

    // Create a list of properties to send to kiss (can be empty)
    properties := url.Values{}
    properties.Set("test property", "true")

    // Finally create the event and send it
    event := km.NewEvent("testing go", "someguy@somesite.com", properties)
    event.Send()
}

That's it, now just run the script and you'll see your event in kissmetrics live view :)

You'll find this script in example.go just in case you need it.

Licence

This library is Copyright 2015 Centric Web Estate and licenced under MIT.

You can’t perform that action at this time.