PDA

View Full Version : Google Analytics Use in Sencha Touch?



Steve Lewis
19 Oct 2010, 10:32 PM
Hi,

Was wondering if anyone has tried to integrate Google Analytics tracking into a Sencha Touch Application? I would like to track things like application signups, etc.

Thanks,

Steve

evant
19 Oct 2010, 10:51 PM
You might want to elaborate, why can't you just include GA like you would on any other page?

Steve Lewis
20 Oct 2010, 11:00 AM
Hi Evan,

Basically would like to incorporate event tracking into each of the different forms and related events, etc (eg: record an event when someone submits signup form). We already include basic tracking into the page which loads the app... but want to do it on a more incremental and fine grained basis (so we can understand exactly how folks are using the app) . Would be nice to have this done as a part of the toolkit( ideally) ... There are some toolkits/opensource projects for doing this for native iphone apps.

Steve

Steve Lewis
21 Oct 2010, 9:20 AM
Did a bit more research on this... turns out its fairly straightforward to incorporate google analytics via java script API calls to their service. Would be useful if that was done automatically as it requires mirroring API calls (and other events) to record events with google.

For example:

Ext.Ajax.request({
url: CONFIG.api_host + "/api/consumer/signup/",
method: 'POST',
params: params,
success: function(msg) {
Ext.getBody().unmask();
Ext.getCmp('app').initializeAfterLogin();
_gaq.push(['_trackPageview', '/api/consumer/signup/']);

Carlos.D
23 Nov 2012, 3:48 AM
No news about this topic ? Someone have all ready integrate GA in it's app ?

Carlos

steve1964
27 Nov 2012, 7:27 AM
If you use phonegap there are plugins for this:
Android: https://github.com/phonegap/phonegap-plugins/tree/master/Android/Analytics/2.0
i (https://github.com/phonegap/phonegap-plugins/tree/master/Android/Analytics/2.0)OS:https://github.com/phonegap/phonegap-plugins/tree/master/iOS/GoogleAnalytics

(https://github.com/phonegap/phonegap-plugins/tree/master/iOS/GoogleAnalytics)

Carlos.D
27 Nov 2012, 7:42 AM
Tks for the reponse. I'm in WebApps context for the moment but it's always usefull to kown that a plugin exist.