Skip to content

feat: report inbox action clicks automatically - #50

Merged
mikemilla merged 2 commits into
mainfrom
mike/action-click-tracking
Aug 28, 2026
Merged

feat: report inbox action clicks automatically#50
mikemilla merged 2 commits into
mainfrom
mike/action-click-tracking

Conversation

@mikemilla

Copy link
Copy Markdown
Collaborator

What

An inbox action carries its own tracking id in data['trackingId'], separate from the message's click tracking id. It lets a click be attributed to the button the user actually pressed rather than to the message as a whole. Nothing in this SDK was reading it, so pressing an action button recorded no click at all.

Changes

  • CourierInbox reports the click when an action is pressed, so tracking does not depend on the integrator remembering to do it.
  • InboxAction.markAsClicked(messageId) exposes the same thing for apps that build their own action buttons, alongside an InboxAction.trackingId getter.
  • New inbox.click_message_action channel method, backed by the existing client.inbox.click on both platforms — no new native SDK surface required.

An action from a template that opted out of tracking arrives without an id, so both paths are a no-op.

Why this shape

Mirrors the convention already shipped in the Android SDK, where InboxAction.markAsClicked(messageId) reads data["trackingId"] and calls client.inbox.click. The same API is being added to iOS and React Native, and the equivalent has landed in the web SDK.

Verification

flutter analyze — no errors in lib/. The only errors reported are pre-existing, in example/integration_test/, from the gitignored env.dart.

🤖 Generated with Claude Code

mikemilla and others added 2 commits August 28, 2026 14:35
An action carries its own tracking id in `data['trackingId']`, separate from the
message's click tracking id, so a click can be attributed to the button the user
actually pressed rather than to the message as a whole. Nothing was reading it,
so pressing an action button recorded no click.

CourierInbox now reports the click when an action is pressed, and
`InboxAction.markAsClicked(messageId)` exposes the same thing for apps that build
their own action buttons. An action from a template that opted out of tracking
arrives without an id and is a no-op.

Adds an `inbox.click_message_action` channel method backed by the existing
`client.inbox.click` on both platforms. Mirrors the convention already in the
Android SDK.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cuts a patch release so the action click tracking in this branch ships.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mikemilla
mikemilla merged commit 69873f1 into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant