esviji / esviji-ubuntu-touch

esviji free puzzle game packed for Ubuntu Touch store
https://esviji.com/
MIT License
2 stars 1 forks source link

Allow identification of Ubuntu Touch device in Google Analytics #1

Closed nhoizey closed 4 years ago

nhoizey commented 4 years ago

@cibersheep the query string in the start_url attribute of the manifest.webmaniefst allows me to know if people use the game from a browser, installed as a PWA, or as an Android app.

Is the manifest also used by Ubuntu Touch apps?

cibersheep commented 4 years ago

Oh, I see. As far as I know, no, it's not used. How I should proceed here?

nhoizey commented 4 years ago

Ok, so I think I have to change how it works and use a JS call instead.

I'll think about it and let you know.

cibersheep commented 4 years ago

Sure!

nhoizey commented 4 years ago

I guess you build the app with npm run build and then put the result in your www folder, is that right?

With this commit: https://github.com/esviji/esviji/commit/e9b6a9f097554c7ea54548480e3f3eef2d9ac1f4

You can now change 'Web' to 'Ubuntu Touch' in nunjucks.config.js before running the build, and it should work. It injects this value in the "About" screen, and the JavaScript get thee value to send it to Google Analytics, like for the version.

cibersheep commented 4 years ago

Ok. That should be it :) I also made the app icon svg (more than appropriate :) )

nhoizey commented 4 years ago

Awesome! 👍