This gem is meant for use with server to server integration with Adjust. More information can be found here: Server-side event tracking
gem 'adjust'
$ bundle
$ gem install adjust
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) # => {...}
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!
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!
- Fork it ( https://github.com/[my-github-username]/adjust/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request