-
17 Dec 2012 11:30 PM #1
Unanswered: Problem in tracking events for sencha touch using Google Analytics
Unanswered: Problem in tracking events for sencha touch using Google Analytics
Hi,
I'm trying to track page clicks for my app. For this, i'm using Google Analytics. On App load, it is counting the users properly. But, i need to track user's usage of app, in which page, user has visited, etc. details.
My code for tracking page view on render is as follows:
And when user enters each view, in painted listener, i've added following code snippet.:Code:<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-XXXXXX-X'], ['_setCustomVar',3,'login','login'], ['_trackPageview'] ); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
But, i was not able to see this tracked event data in my Google analytics account page.Code:_gaq.push(['_trackEvent', 'LoginForm', 'clicked']);
Please suggest me how to achieve tracking each view hit.
Thanks
-
19 Dec 2012 11:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 436
- Answers
- 3108
First, the way you are listening is the painted event listener firing? Past that, sounds more like a google question.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Dec 2012 9:20 PM #3
@mitchellsimoens
Yes, Event is getting fired and trackEvent is returning true aswell. It could be google's a question.
Thanks


Reply With Quote