Custom Data

Custom data api allows you to save custom data related to your users. You can than use the data you saved to identify and send targeted notifications to individual users rather than sending a broadcast. Custom data saves you the trouble of saving PopNotifi ids on your server and than using those to target individual users. You can save the data for current user by calling the following function and passing a JSON object to it.

popnotifi("userData", {"id" : "[Id of user in your database]", "name" : "Ben"});

You can send as many fields in the JSON object as you want. Our server uses the id field to identify the users so it is highly recommended that you include a numeric id field in the JSON object. You can remove the data associated with a user by calling.

popnotifi("removeData");

Last updated