I am aware that this question is mostly a duplicate of tag registration ANH but there is no specific answer and that's why I am putting it again.
I am working on a Cordova app and using this Azure Mobile Services plugin (https://github.com/Azure/azure-mobile-apps-cordova-client) to register for Push Notifications. I get a successful response from PNS (gcm and apns), and the call to register (registration event) with Notification hub also returns a successful response below. I also get the notifications on the device (both on IOS and Android) when I send the notifications using the 'Test Send' utility from Azure notification hub without specifying tags, but no notifications are received when I try to send notifications using Tags. Is there any other way to register tags?
client.push.register('gcm', handle, {
mytemplate: { body: { data: { message: "{$(messageParam)}" } },
tags: [tag}
}).then(function(data){
alert("success");
},function(error){
alert(error);
});} else if (device.platform === 'iOS') {
// Register for notifications.
client.push.register('apns', handle, {
mytemplate: { body: { aps: { alert: "{$(messageParam)}" } },
tags: [tag]}
}).then(function(data){
alert("success");
},function(error){
alert(error);
});}