totango

package module
v0.0.0-...-0ea0e00 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2014 License: MIT Imports: 3 Imported by: 0

README

totango

Library for the Totango server integration API

Example

This example is available at http://play.golang.org/p/mzbdgg6kzD

package main

import "github.com/BenjaminRH/totango"

func main() {
	tracker, _ := totango.NewTracker("SP-XXXX-YY")
	
	// Track a new event
	tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
	
	// Now update an account attribute
	tracker.TrackAttribute("account123", "", "Some Attribute", "The Value")
	
	// Or update a user attribute
	tracker.TrackAttribute("account123", "userbob@example.com", "Foo", "Bar")
	
	// How about multiple attributes?
	tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
		"An Attribute": "The value",
		"Another one": "value",
		"Maybe a third": "value",
	})
}

Documentation

Overview

Package totango provides bindings for the Totango server side integration API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

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

func NewTracker

func NewTracker(serviceID string) (*Tracker, error)

func (*Tracker) Track

func (t *Tracker) Track(accountID, accountName, userName, activity, module string) (*http.Response, error)

func (*Tracker) TrackAttribute

func (t *Tracker) TrackAttribute(accountID, userName, name, value string) (*http.Response, error)

func (*Tracker) TrackAttributes

func (t *Tracker) TrackAttributes(accountID, userName string, attributes map[string]string) (*http.Response, error)

Jump to

Keyboard shortcuts

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