1. #1
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    25
    Vote Rating
    1
    Answers
    1
    Ola GP is on a distinguished road

      0  

    Default Answered: Google Analytics setup for native packaged web app

    Answered: Google Analytics setup for native packaged web app


    I have searched the forums but couldn't find a working solution. I need Google Analytics to track an app that is packaged for iOS and Android.

    My own attempts does only work when using the app as a web app. But when packaged as iOS and Android native app, the analytics does not work.

    Has anyone got this to work and would like to share a step by step solution for others to follow?

  2. I have tried a number of different things, but had the most success with this:

    https://github.com/ggendre/GALocalStorage

    One of the reasons I like it the most is that it uses website analytics using localstorage instead of cookies to store session information (if offline). It was the easiest to set up and you don't have to muck around with native analytics for Android or iOS and the usage is consistent across the platforms. Plus it's JS.

    I'm using it with both Android 4+ and iOS 6... works like a charm.

    I can't justify the time to write up a step by step guide, but I found it fairly easy to implement.

    Good luck!

  3. #2
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    68
    Vote Rating
    3
    Answers
    1
    PhilMerrell is on a distinguished road

      0  

    Default


    I have tried a number of different things, but had the most success with this:

    https://github.com/ggendre/GALocalStorage

    One of the reasons I like it the most is that it uses website analytics using localstorage instead of cookies to store session information (if offline). It was the easiest to set up and you don't have to muck around with native analytics for Android or iOS and the usage is consistent across the platforms. Plus it's JS.

    I'm using it with both Android 4+ and iOS 6... works like a charm.

    I can't justify the time to write up a step by step guide, but I found it fairly easy to implement.

    Good luck!

  4. #3
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    25
    Vote Rating
    1
    Answers
    1
    Ola GP is on a distinguished road

      0  

    Default


    Thanks, will try it out. Will see in 24h if some data shows up in Google Analytics. The realtime tracking in does not show any data though. Maybe realtime tracking doesn't work with packaged apps?

  5. #4
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    68
    Vote Rating
    3
    Answers
    1
    PhilMerrell is on a distinguished road

      0  

    Default


    I have realtime tracking working. I didn't have to do anything special. I did notice that there is some latency... sometimes 30 seconds or more before it will register the pageview or event tracking.

  6. #5
    Sencha User
    Join Date
    Jan 2013
    Posts
    3
    Vote Rating
    0
    rnavinchand is on a distinguished road

      0  

    Default


    what kind of account do you have to setup on the google analytics website to use this ?

  7. #6
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    25
    Vote Rating
    1
    Answers
    1
    Ola GP is on a distinguished road

      0  

    Default


    An update: I finally got this to work perfectly on my native packaged app. The realtime analytics works also. I used the script mentioned above (https://github.com/ggendre/GALocalStorage). On that page there is instructions to use the "Web site" type of account. Not the "App" type.

  8. #7
    Sencha User
    Join Date
    Jan 2013
    Posts
    3
    Vote Rating
    0
    rnavinchand is on a distinguished road

      0  

    Default


    Quote Originally Posted by Ola GP View Post
    An update: I finally got this to work perfectly on my native packaged app. The realtime analytics works also. I used the script mentioned above (https://github.com/ggendre/GALocalStorage). On that page there is instructions to use the "Web site" type of account. Not the "App" type.
    so what did you set for the default URL under profile settings ?

  9. #8
    Sencha User Ola GP's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    25
    Vote Rating
    1
    Answers
    1
    Ola GP is on a distinguished road

      0  

    Default


    Quote Originally Posted by rnavinchand View Post
    so what did you set for the default URL under profile settings ?
    We have a simple web page with links to App Store and Google Play. I just used that URL.

  10. #9
    Sencha User
    Join Date
    Jan 2013
    Posts
    3
    Vote Rating
    0
    rnavinchand is on a distinguished road

      0  

    Default


    Quote Originally Posted by Ola GP View Post
    We have a simple web page with links to App Store and Google Play. I just used that URL.
    thanks finally got it working last evening