Folks ! 

For AGPUSH-969[1] and to kick off the discussions,  I started a small POC mainly focused on the backend. To sum up quickly : we want to know how many installations/users has  opened the application after that a Push Notification has been touched. 

So, the very first thing that had to be done was to give the Push Notification a unique identifier, so that we can track it and do the metrics on it.

For that, I have been using an existing model object that we have , the PushMessageInformation[2], and that is currently used to provide information for our dashboard.
This object has now some extra fields, like a appOpenCounter etc ... 

The ID of this PushMessageInformation is now passed into the payload of the Push Message, just before we send it,  this way the client library can use this ID to pass extra information to the UPS when a notification is touched. 
For this POC, I hijacked the cordova-helloworld, so that it extracts the ID from the payload and pass it as header when registering.

When the UPS receive the request, it looks for the header and if it exist it updates the existing PushMessageInformation instance. 

Please note, that for this POC, all is happening on Application level and not on Variant level but that can be easily changed. It depends on how fined grained we want to have these analytics.

I did a small screencast that shows this in action : https://www.youtube.com/watch?v=PseBBJZLz6s&feature=youtu.be

The UPS branch containing the changes is here (the 2 latests commits are relevant) : https://github.com/sebastienblanc/aerogear-unified-push-server/tree/analytics

The client app is not really relevant since I really hacked badly the app (and the push plugin) ;) , however if interested I may share it.

Now, let's discuss :)

Sebi

[1] https://issues.jboss.org/browse/AGPUSH-969
[2] https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/PushMessageInformation.java