Skip to content

DynamoMTL/adjust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

 
 
 

Languages