perfecty-push-wp icon indicating copy to clipboard operation
perfecty-push-wp copied to clipboard

Creating a taxonomy for notifications

Open MocioF opened this issue 4 years ago • 5 comments

One enhancement could be to give users the possibility to chose between notifications categories they want to subscribe

MocioF avatar May 28 '21 08:05 MocioF

@MocioF thanks for the PR with the Notifications scheduling. I'll review it :)

Yeah, that would be a great idea, and it aligns with the Google recommendations for Push Notifications. This would be part of the User Segmentation features for the plugin I imagine, where we could target specific categories the users have manifested interest, right?

rwngallego avatar May 28 '21 22:05 rwngallego

it's done, on the fork : https://github.com/cri-tech/perfecty-push-wp

cri-tech avatar Jul 29 '21 11:07 cri-tech

Hi @cri-tech would you like to send a PR maybe? Thank you!

rwngallego avatar Jul 30 '21 17:07 rwngallego

Its been 6th month without any progress on this, are there any plans or should I try @cri-tech solution?

aamir2007 avatar Jan 01 '22 07:01 aamir2007

As per @aamir2007:

I have done some work in this regard, please check blow site with full implementation.
https://starepisodes.net/

Current flow of work.
By default notifications are disabled and user is asked to login when it clicks on Bell icon, after login, on Category and Single Post page user can individually subscribe to categories so that it only get notification of posts published in that specific category.

A custom database table is generated to hold user_id, term_id and taxonomy to keep record of user subscriptions. On post publish users are returned based on post category and sent notification.

Further a shortcode is added which shows users currently subscribed categories along with option to unsubscribe.

I had to make little bit changes to the perfecty-push-sdk.min.js file to include term_id and taxonomy along with register and unregister requests and some other minor changes like adding a global plugin to activate plugin from outside javascript.

Obviously the solution is not perfect but I want to present it here so that someone having better expertise can review it and implement this into main plugin.

Once you have taken a look at current working of this functionality on the website, let me know if you are interested, I can share my code here so it can be used to further improve the plugin.

Right now I am having two issues,

when notifications are disabled on the browser, there should be a message for user explaining how he/she can allow notifications for browser settings.
In current scenario there is no option for me to schedule notifications for users that are subscribed in specific category, in this case if there are more user subscribed to a category this could lead to heavy load onto server.
Regars,
Aamir

rwngallego avatar Feb 07 '22 17:02 rwngallego