Project

adjust

0.01
No commit activity in last 3 years
No release in over 3 years
A Ruby Adjust.com API Wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
>= 0
>= 0
>= 0
>= 0

Runtime

>= 0
 Project Readme

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