parse-community / parse-community/parse-server-push-adapter
Add Analytics Label Support for FCM Messages in Parse Server Push Adapter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 96
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
Currently, the Parse Server push adapter does not support adding analytics labels to FCM messages. Without an analytics label, Firebase’s delivery statistics for data messages are limited and cannot be fully filtered or analyzed in the Firebase console.
Feature / Enhancement Description
This feature request proposes adding support for analytics labels in the FCM payload generated by the push adapter. Specifically, the adapter should:
- Allow developers to include an
analytics_labelfield in their push notification request data. - Validate the provided label against the regex pattern
^[a-zA-Z0-9-_.~%]{1,50}$(ensuring it contains only letters, numbers, and the symbols-_.~%with a maximum length of 50 characters). - If valid, inject the label into the outgoing payload under
fcm_options.analytics_label.
This change would help align the adapter’s behavior with Firebase’s HTTP v1 API requirements and enable developers to filter and view detailed delivery statistics for their push notifications in the Firebase console.
Example Use Case
- A developer wants to monitor push delivery for a new feature update.
- They include
analytics_label: "feature_update_v1"in the push notification payload. - The push adapter processes the request, validates the label, and adds it under the
fcm_options.analytics_labelfield. - Firebase records and displays delivery statistics for messages with this label, enabling the developer to filter reports and analyze the campaign’s performance.
Alternatives / Workarounds
I haven't found an alternative or workarounds
3rd Party References
- Firebase documentation on analytics labels: Adding analytics labels to messages
- Stackoverflow discussion: FCM not showing any data in reports
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the FCM payload construction and any existing validation or payload tests in the adapter. Add support for the requested analytics_label input, validate the specified pattern and length, and confirm valid labels appear under fcm_options.analytics_label while invalid labels are rejected or ignored according to existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- firebase, javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100