<div dir="ltr">On Mon, Mar 30, 2015 at 12:29 PM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Folks ! <div><br></div><div>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. </div></div></blockquote><div><br></div>Let me see if I understood. UPS will send a message to the client and when the message be *read* (instead of delivered), the client will send a message back to the UPS saying: "The message was read"?<br> <br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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.</div></div></blockquote><div><br></div><div>+1. Not only us (UPS) but also the backend app<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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.</div><div>This object has now some extra fields, like a appOpenCounter etc ... </div><div><br></div><div>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. </div><div>For this POC, I hijacked the cordova-helloworld, so that it extracts the ID from the payload and pass it as header when registering.</div></div></blockquote><div><br></div><div>The message back (from client to UPS) will be send every time the user _read_ that?<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>When the UPS receive the request, it looks for the header and if it exist it updates the existing PushMessageInformation instance. </div><div><br></div><div>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.</div><div><br></div><div>I did a small screencast that shows this in action : <a href="https://www.youtube.com/watch?v=PseBBJZLz6s&feature=youtu.be" target="_blank">https://www.youtube.com/watch?v=PseBBJZLz6s&feature=youtu.be</a></div><div><br></div><div>The UPS branch containing the changes is here (the 2 latests commits are relevant) : <a href="https://github.com/sebastienblanc/aerogear-unified-push-server/tree/analytics" target="_blank">https://github.com/sebastienblanc/aerogear-unified-push-server/tree/analytics</a></div><div><br></div><div>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.</div><div><br></div><div>Now, let's discuss :)</div><div><br></div><div>Sebi</div><div><br></div><div>[1] <a href="https://issues.jboss.org/browse/AGPUSH-969" target="_blank">https://issues.jboss.org/browse/AGPUSH-969</a></div><div>[2] <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/PushMessageInformation.java" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/PushMessageInformation.java</a></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">-- Passos<br></div></div>
</div></div>