I'm looking to use google analytics without a plugin with phoneGap 2.1.
I followed this thread:
How to use Google Analytics with Phonegap without a plugin?
Step:
1. download the ga.js
2. modify the ga.js file by adding one character to it. Search the ga.js file for the word "file:" and replace it with "_file:".
3. include the google analytics code in the top of your page
But it seems it doesn't work in phoneGap 2.1.
Somebody has found a solution for this problem?
Thank you
in my ga.js file I have "_file:",
in my index.html I have this code:
<script type="text/javascript" src="js/ga.js"></script>
and in my javascript:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36500003-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackEvent', 'IpadVideos', 'Play', 'Gone With the Wind']);
When I'm going in the reporting of Google, in the real time I have nobody and for my event action I have checked the next day and I have nothing...
Something wrong in my code?