Skip to content

DynamoMTL/adjust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0952c25 · Jan 16, 2017

History

44 Commits
Jan 12, 2017
Jan 11, 2017
May 4, 2015
May 4, 2015
May 7, 2015
May 4, 2015
Jan 11, 2017
May 4, 2015
May 4, 2015
Jan 10, 2017
May 4, 2015
Jan 11, 2017

Repository files navigation

Adjust Build Status

This gem is meant for use with server to server integration with Adjust. More information can be found here: Server-side event tracking

Installation

Add this line to your application's Gemfile:
gem 'adjust'
And then execute:
$ bundle
Or install it yourself as:
$ gem install adjust

Usage

Configuration

By default the configurations will be read from config/adjust.yml. Also of note the environment loaded will be that of RACK_ENV, RAILS_ENV or as a last resort default of 'development'.

Example config:

development:
  environment: sandbox
  dev_app:
    app_token: app_token
    event1:
      event_token: event_token

We would then be able to refer to the token using the key given in the config:

Adjust.event(app: :dev_app, event: :event1, idfa: :idfa).track!

Or by their tokens

Adjust.event(app: :app_token, event: :event_token, idfa: :idfa).track!

Loading the configurations

Adjust.load(environment: 'test') # => {...}
Adjust.load('path/to/adjust.yml')  # => {...}
Adjust.load('path/to/adjust.yml', environment: 'staging') # => {...}
Adjust.load(config: {...}) # => {...}
Adjust.load(config: {...}, environment: 'staging') # => {...}
Adjust.load(config: Rails.application.secrets.adjust) # => {...}
Event tracking

idfa can also be any other values such as android_id or gps_adid check Adjust's documentation for details.

Adjust.event(app: :app, event: :event, idfa: :idfa).track!
Revenue tracking

idfa can also be any other values such as android_id or gps_adid check Adjust's documentation for details.

Adjust.revenue(app: :app, event: :event, revenue: 1.25, currency: 'USD|CAD|EUR', idfa: :idfa).track!

Contributing

  1. Fork it ( https://github.com/[my-github-username]/adjust/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A Ruby Adjust.com API Wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages