1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Hyderabad
    Posts
    39
    Answers
    2
    Vote Rating
    0
    janardhan pasumarthi is on a distinguished road

      0  

    Default 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:

    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>
    And when user enters each view, in painted listener, i've added following code snippet.:

    Code:
    _gaq.push(['_trackEvent', 'LoginForm', 'clicked']);
    But, i was not able to see this tracked event data in my Google analytics account page.

    Please suggest me how to achieve tracking each view hit.

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,064
    Answers
    3498
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Location
    Hyderabad
    Posts
    39
    Answers
    2
    Vote Rating
    0
    janardhan pasumarthi is on a distinguished road

      0  

    Default


    @mitchellsimoens

    Yes, Event is getting fired and trackEvent is returning true aswell. It could be google's a question.


    Thanks

Thread Participants: 1

Tags for this Thread