Proper Analytics setup

May 1, 2013 at 3:13 PM
Hello, I'm trying to use this to report to my Analytics account from a Javascript / HTML5 Windows 8 app, but it doesn't seem to be working (And I'm not sure how to debug the requests, the flag doesn't seem to do anything).

I'm just wondering if my Analytics account is set up properly, I set it up as one of the new Universal Analytics accounts, but it still required a URL, which is where I got confused.
I put in my site's URL but it doesn't make sense for tracking from an app.

Anyway, after putting in the tracking ID and setting up some event reporting / view reporting in my app I clicked around for a while checked the analytics site and didn't see any hits.

I know it dispatches the hits but I was in the app long enough for the dispatch to happen.

Any tips for debugging the issue? Am I being impatient? I'm fairly new to Google Analytics, is the data live or is it processed at the end of the day?

Does the appName in analytics.xml have to match something in my analytics account?
Coordinator
May 1, 2013 at 3:47 PM
Hello, when you setup your account, you need to choose "App" instead of "Web Site". The fact that it asked for your site URL indicates that you chose the later.
Image

To test that data is flowing, you can:
  1. Use a tool like Fiddler to look for requests sent to Google Analytics
  2. Use the Google Analytics "Real-Time" report to see active connections from the last 30 minutes.
Note: the DispatchPeriod is set to 30 seconds by default in your analytics.xml. This means data is only sent ever 30 seconds to Google Analytics. For testing, I would suggest setting this to 0 to see data sent as it occurs.
<dispatchPeriod>0</dispatchPeriod>
Thanks for the feedback, I just updated the Getting Started page in the docs to mention setting up the account to help others that run into this in the future.

Let me know if you continue to have problems, Tim
May 1, 2013 at 3:54 PM
That makes sense! I guess I thought to go with website because it's a Javascript app, and the app button only mentions Android and iOS.
Thanks.