Giter Site home page Giter Site logo

go-adjust's Introduction

Go Adjust API Client

GoDoc Build Status Civerage

This is a Go library for Adjust that currently supports server side event tracking.

For more information see https://docs.adjust.com/en/event-tracking/

Documentation

The full documentation is available on Godoc

Usage

client := adjust.New(goadjust.Config{
    AppToken: "4w565xzmb54d",
    Environment: goadjust.Sandbox,
})

_, err := client.TrackEvent("event_token", goadjust.IDFA, "D2CADB5F-410F-4963-AC0C-2A78534BDF1E", time.Now())
if err != nil {
    log.Fatal(err)
}

_, err = client.TrackRevenue("event_token", 990, goadjust.IDFA, "D2CADB5F-410F-4963-AC0C-2A78534BDF1E", time.Now())
if err != nil {
    log.Fatal(err)
}

Tests

Go-adjust contains both unit tests and integration tests. To run the tests run the commands below:

go test ./...

To run the integration tests you must pass the tokens and a valid device ID (IDFA) via environment variables along with the integration build tag. When running the integration tests events are published to the specified Adjust account in Sandbox mode.

ADJUST_APP_TOKEN=... ADJUST_EVENT_TOKEN=... ADJUST_DEVICE_ID=... go test -tags=integration

Note Please note that the tests currently do not work in Go 1.3 as the mocked net/http.Transport is being ignored (possibly due to a bug in the stdlib?), this should hopefully be fixed soon.

go-adjust's People

Contributors

dancannon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.