add track delivery metric#112
Closed
eserra wants to merge 4 commits into
Closed
Conversation
5 tasks
hownowstephen
added a commit
that referenced
this pull request
May 8, 2026
* 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.
Contributor
|
closing in favour of #139 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
/push/eventsendpoint is deprecated in favor of the/metricsendpointThis PR implements track_delivery_metric to leverage the new endpoint
Note that the validation of the parameters depends on the channel of the delivery, which is unknown at runtime