You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add track_delivery_metric for /api/v1/metrics endpoint (#139)
* Add track_delivery_metric for /api/v1/metrics endpoint
Adds support for reporting delivery metrics (opened, clicked,
converted, delivered, bounced, deferred, dropped, spammed) via the
new /api/v1/metrics endpoint, replacing the deprecated /push/events
endpoint.
Based on community PR #112 by @eserra with fixes for:
- valid_url? bug that passed boolean instead of URL string
- .present? usage (Rails-only, unavailable in plain Ruby)
- Breaking constant renames (PUSH_* constants preserved)
- Inconsistent attribute handling (now uses symbolize_keys/slice)
* Remove PUSH_* constants, use DELIVERY_* for VALID_PUSH_EVENTS
PUSH_OPENED/PUSH_CONVERTED/PUSH_DELIVERED were duplicates of
DELIVERY_OPENED/DELIVERY_CONVERTED/DELIVERY_DELIVERED. Consolidate
to a single set of constants.
* Fix rubocop: use single quotes inside string interpolation
* Add back PUSH_* constants as deprecated aliases
Preserves backwards compatibility for anyone referencing
PUSH_OPENED, PUSH_CONVERTED, or PUSH_DELIVERED directly.
Copy file name to clipboardExpand all lines: CHANGELOG.markdown
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,8 @@
1
+
## Customerio 5.7.0 - Unreleased
2
+
### Added
3
+
- Added `track_delivery_metric` to `Client` for reporting delivery metrics via the `/api/v1/metrics` endpoint, replacing the deprecated `/push/events` endpoint. Supports metrics: opened, clicked, converted, delivered, bounced, deferred, dropped, and spammed.
4
+
- Added `DELIVERY_*` constants and `VALID_DELIVERY_METRICS` to `Customerio::Client`.
5
+
1
6
## Customerio 5.4.0 - June 13, 2025
2
7
### Changed
3
8
- Added `send_sms` to `APIClient` and `SendSMSRequest` to support sending transactional push notifications.
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,26 @@ Deleting a device token will remove it from the associated customer to stop furt
287
287
$customerio.delete_device(5, "my_device_token")
288
288
```
289
289
290
+
### Tracking delivery metrics
291
+
292
+
Report delivery metrics using the `track_delivery_metric` method, which calls the `/api/v1/metrics` endpoint. This replaces the deprecated `/push/events` endpoint. The `delivery_id` is required. Valid metrics are: `opened`, `clicked`, `converted`, `delivered`, `bounced`, `deferred`, `dropped`, `spammed`.
0 commit comments