I have made an app using jQuery mobile and phoneGap, and read its good to put Google Analytics on there. I just a little confused because most of the app (pages etc… ) runs from the index.html file on the phone. The only time the app communicates with the server is when it logs a user in and they do ajax requests to retrieve or put data to a database.
Can I still use the analytics package here? Or is the whole point of it to be used with an app where all the DOM etc is stored online?
Thanks
You can probably use the event tracking feature of Google Analytics to help you out here:
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
You basically just fire a js function and pass in descriptive strings and category I think for each of the interactions you want to track / report on:
_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)
Hope that helps