Hi everyone
Finaly I have a very easy 3 step solution 🙂
1. Create a google Analytics account and choose website property (it is VERY important NOT to chose Mobileapp)
2. Download, include analytics.js in your app. It can be found here:
http://www.google-analytics.com/analytics.js
Open analytics.js and modify the file – remove the code that aborts itself when it doesn’t see either the http or https protocol.
Search for: if(“http:”!=a&&”https:”!=a)throw”abort”;
Modyfy it this way:
Before: if(“http:”!=a&&”https:”!=a)throw”abort”;
After: //if(“http:”!=a&&”https:”!=a)throw”abort”;
3. Put this code in your pagename-custom.js under:
'
phoneui.prePageTransition = function(currentScreenId,targetScreenId) {'
Google analytics->
ga('create', 'UA-xxxxxxxx-yy', {
'storage': 'none',
'clientId': window.localStorage.getItem('devId') //Be shure this is a uniq ID eg. use email or device.uuid
});
ga('send', 'pageview', {'page':targetScreenId});
Google analytics<-
Thats it!