Skip to content

Conversation

bogdandobritoiu
Copy link
Contributor

@bogdandobritoiu bogdandobritoiu commented Oct 1, 2025

Description

Ticket: CP-10502

Please provide:

  • A summary of the changes
  • Motivation and context for this change
  • Any dependencies introduced
  • (If breaking) migration steps and instructions

Added analytics events for Push notifications in posthog

Event Params Trigger Secondary Trigger
PushNotificationSubscribed channelld, tokenId (optional) toggled OFF from the notification preferences screen press the favorite button on track
PushNotificationUnsubscribed channelId toggled ON from the notification preferences screen press the favorite button on track
PushNotificationReceived channelId, deeplinkUrl push notification was received and displayed
PushNotificationPressed channelId, deeplinkUrl (optional) pressed the push notification
PushNotificationAccepted - user accepts permissions
PushNotificationRejected - user rejects permissions

Screenshots/Videos

Include relevant screenshots or screen recordings of iOS and Android.

PushNotificationAccepted/PushNotificationRejected
https://github.com/user-attachments/assets/6ea3a301-73a8-4dad-a059-610e490b0658
https://github.com/user-attachments/assets/89b601c1-4ce7-4e50-b8a8-fecc9185e3e1

PushNotificationSubscribed/PushNotificationUnsubscribed (Notification Preferences screen)
https://github.com/user-attachments/assets/3d28b6fa-fcd2-4623-8c2b-3eacd34efe18

PushNotificationSubscribed/PushNotificationUnsubscribed (Favorite Token)
https://github.com/user-attachments/assets/f1231d37-c916-48ff-949d-c424fa65d0dc

PushNotificationReceived/PushNotificationPressed
https://github.com/user-attachments/assets/be340719-576e-4bee-b1cd-b1d6a6362677

Testing

Dev Testing (if applicable)

  • Provide steps to test the happy path of your feature
  • Provide steps to test edge cases and error states
  • Trigger a build on bitrise and reference it here
  • Move the ticket into the "Testing" column on Jira

iOS - 6382
Android - 6383

You need access to Posthog production project

1. Accepted/Rejected

  • Disable push notifications from the System settings
  • Open app and accept/reject the permissions
  • Verify if events are in posthog

2. Subscribed/Unsubscribed (notification preferences screen)

  • toggle on/off any channel
  • verify if events are in posthog with correct channelId

Channel IDs
balanceChanges/productAnnouncements/offersAndPromotions/marketNews/priceAlert/favTokenPriceAlerts (without tokenId)

3. Subscribed/Unsubscribed (favorite tokens from track flows)

  • open track token details and favorite/unfavorite a token
  • verify if event is in posthog with correct channelId (favTokenPriceAlerts) and tokenId

4. Received/Pressed (foreground)

  • trigger a push notif on contentful with url "core://watchlist/wink-3"
  • press notification to foreground app
  • verify if events are in posthog with correct params (channelId + deeplinkUrl)

4. Received/Pressed (background)

  • trigger a push notif on contentful
  • press notification to open app
  • verify if events are in posthog with correct params (channelId + deeplinkUrl)

QA Testing (if applicable)

  • Provide instructions for QA to test this feature thoroughly
  • State expected behavior / acceptance criteria

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

@bogdandobritoiu bogdandobritoiu marked this pull request as ready for review October 7, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants