I have 2 iOS apps which I am trying to connect to google analytics. One of them is working, the other is not!
The one which is working has been published for a couple of years now. The one that is not working is a new app, but uses the same code - just different graphics & data.
In the log, the only difference I can see is (the app which is working):
INFO: GoogleAnalytics 3.10 -[GAIBatchingDispatcher didSendHits:response:data:error:]
(GAIBatchingDispatcher.m:208): Hit(s) dispatched: HTTP status 200
The app which isn't working shows:
INFO: GoogleAnalytics 3.10 -[GAIBatchingDispatcher didSendHits:response:data:error:]
(GAIBatchingDispatcher.m:208): Hit(s) dispatched: HTTP status -1
As far as I can tell, the set up on GA side is identical, and both apps use the same files for code. Also the request seems to be the same, apart from the app id and UA key - which are correct:
VERBOSE: GoogleAnalytics 3.10 -[GAIBatchingDispatcher persist:]
(GAIBatchingDispatcher.m:497): Saved hit: {
parameters = {
"&_crc" = 0;
"&_u" = ".etno";
"&_v" = "mi3.1.0";
"&a" = 53345067;
"&aid" = "com.mycompany.myapp";
"&an" = Recipes;
"&av" = "2.2";
"&cd" = Recipes;
"&cid" = "f2da689b-ebdb-4e9e-9370-b8150c9950f1";
"&ds" = app;
"&sr" = 320x568;
"&t" = appview;
"&tid" = "UA-56722604-1";
"&ul" = "en-gb";
"&v" = 1;
"&z" = 2718623027941064481;
gaiVersion = "3.10";
};
timestamp = "2014-11-14 11:33:17 +0000";
}
Any idea why I would be getting a -1 http status?
Thanks for looking.
EDIT
Having looked at this further, I am sometimes getting a 200 status in the app which is not working - I am guessing the -1 indicates a temporary network error (My internet connection has been pretty flaky this week!)
But even with the 200 response I still see no data in GA.
Well, turns out it is actually working. However the 'real time' results are not working, and it took over 72 hours (from GA account creation) before results were seen in GA!