- The
identify
method has been updated to allow the customer ID to be specified separately from the attributes, using thecustomer_id
attribute. This allows a person to be updated by identifying them by e.g.: their email address. Thanks to trwalzer, jrbeck and jeremyw for the original changes that this is based on. - It is no longer possible to set the
customer_id
attribute on a person. This is a side-effect of the changes to theidentify
method.
- The
identify
method will now automatically use thecio_id
attribute as the customer ID when calling the track service. This allows a customer to be updated usingidentify
to modify theid
andemail
attributes.
- Added
send_push
toAPIClient
andSendPushRequest
to support sending transactional push notifications.
- Added the
disable_css_preprocessing
andlanguage
optional fields to send request
- Support for anonymous invite events by setting
anonymous_id
tonil
.
- Added support for merge customers API
- Update addressable gem dependency to v2.8.0
- The
anonymous_track
method.
- The
track_anonymous
method replacesanonymous_track
. This method requires ananonymous_id
parameter and will no longer trigger campaigns. If you previously used anonymous events to trigger campaigns, you can still do so directly through the API. We now refer to anonymous events that trigger campaigns as "invite events".
- Support for EU region
Customerio::Client
andCustomerIO::APIClient
have a new parameterregion
that can be set to eitherCustomerio::Regions::EU
orCustomerio::Regions::US
(defaults toCustomerio::Regions::US
)
- Support for the Transactional API
add_to_segment
andremove_from_segment
methods- Support for non-JSON data
- IDs in the URLs are now escaped.
- Improved validations for data that's passed in.
- Earlier, if you passed in an event name without a customer ID to the
track
method, we would create an anonymous event. That is now removed. To create an anonymous event, use theanonymous_track
method.
- Support for the Transactional API
add_to_segment
andremove_from_segment
methods- Support for non-JSON data
- IDs in the URLs are now escaped.
- Improved validations for data that's passed in.
- Earlier, if you passed in an event name without a customer ID to the
track
method, we would create an anonymous event. That is now removed. To create an anonymous event, use theanonymous_track
method.
Add support for manual segments #52
Added support for the suppress / unsuppress methods #49
With this release we have dropped the support for ruby 1.8.7.
- Support new add and remove device endpoints for push notifications #47
There is a slight breaking change in this release. If you are depending on the HTTP response object included in the InvalidResponse exception (introduced in 0.6.1), note that it is now a Net::HTTPBadRequest
.
-
Remove HTTParty dependency, use Net::HTTP instead. #42
-
Update test suite to use webmock, to increase confidence that we're not changing our HTTP requests #41
-
Add new method for tracking anonymous events:
anonymous_track
. See README for more details. Many thanks to @sdawson for this contribution! #36 -
Use JSON encoding by default. #37
If you want to stick with form-encoding for your integration, you must add
:json => false
to your Customerio::Client initializer. Like this:customerio = Customerio::Client.new("YOUR SITE ID", "YOUR API SECRET KEY", :json => false)
-
Include HTTP response as an attribute on the InvalidResponse exception to help with debugging failed API requests. For example:
begin $customerio.track(1, 'event', { :test => 'testing' }) rescue => e puts e.message puts e.response.status puts e.response.body end
Deprecation warning: we are going to switch to JSON encoding by default for the next release. The current default is form-encoding. This will probably not affect you, unless you rely on how form-encoding arrays work.
If you want to stick with form-encoding for your integration, you must add :json => false
to your Customerio::Client initializer. Like this:
customerio = Customerio::Client.new("YOUR SITE ID", "YOUR API SECRET KEY", :json => false)
Other fixes and improvements, with many thanks to the community contributors:
- Added HTTP timeout of 10 seconds (@stayhero)
- Added JSON support for events (@kemper)
- Convert attribute keys to symbols (@joshnabbott)
- Added flag to send body encoded as JSON, rather than the default form encoding.
- Removed deprecated methods around using a customer object. All calls simply take a hash of attributes now.
- Added ability to set a timestamp on a tracked event. Useful for backfilling past events.
- Bug fixes related to the 4.0 change.
- Added support for deleting customers.
- Now raise an error if an API call doesn't respond with a 200 response code
- Removed dependency on ActiveSupport
- Allow raw hashes to be passed into
identify
andtrack
methods rather than a customer object. - Passing a customer object has been depreciated.
- Customizing ids with
Customerio::Client.id
block is deprecated.
- Allow tracking of anonymous events.
- Bump httparty dependency to the latest version.
- First release.