0

I am sending notifications using the OneSignal REST API with a link that is opened when the user clicks on the notification, and was wondering if there is a way to append the playerID to the end of the URL.

what I am looking for would be something like:

http://www.link.com/page.html?var=val&playerid=<the unique device id>

I suspect there is a way of doing this because you are tracking the deliveries and clicks in the Onesignal control panel.

It looks like the Tag & Variable Substitution may be a path to the resolution, but I don't see any documentation

On the device side, I am building the app using Phonegap for iOS and Android

Victor
  • 103
  • 1
  • 11

1 Answers1

0

there is no need to url and params if you work on android and ios push as onesignal used for this so send the playerID in customer message tag so app developer use a api when he click on push notification this is only and only android and ios notification

Priyanka Sankhala
  • 808
  • 1
  • 9
  • 25
  • Sorry Priyanka, I'm not clear what you mean, but I think you may be on the right track. – Victor Jul 29 '17 at 18:29
  • @Victor if you know about firebase push in android so its easy for you `$fields = array ( 'to' => $registrationIds, 'notification' => $msg );` here $msg is a array in this you send push now add a new key in fields array like custom_message and its value also a array like $msg in this array you can send push message and playerID after that app developer job to get this id and so next task – Priyanka Sankhala Jul 29 '17 at 19:45
  • @ Priyanka If I am understanding what you are saying, you are suggesting that I just send a unique id with the message? For what I want I don't think that is the best solution. That would mean that I would have to send individual messages to each user with a unique ID in each. I was hoping to use the existing UUID generated for each player so that I can send one notification to all the users, and when they click it they will be unique. – Victor Jul 31 '17 at 06:52
  • @Victor: in push there is normally two case one a common message you want to deliver to app customer in that case just do send a message and call a api when app customer hit the notification with app user id other case is you want to inform to app user for different play id and want to store which play get the max hit in that case you need to send a play id in custom message Hope you get my point – Priyanka Sankhala Jul 31 '17 at 07:07