Reputation: 882
I've tried everything. I triple-checked the dashes in the ID in analytics.xml, I have the two permissions needed, I have
EasyTracker.getInstance().activityStart(this);
EasyTracker.getInstance().activityStop(this);
in the appropriate methods, and I still get the following in logcat:
Thread[main,5,main]: Connection to service failed 1
Thread[main,5,main]: Need to call initialize() and be in fallbackmode to start dispatch.
Thread[GAThread,5,main]: No campaign data found.
Thread[GAThread,5,main]: putHit called
Thread[GAThread,5,main]: putHit called
Thread[Service Reconnect,5,main]: connecting to Analytics service
Thread[Service Reconnect,5,main]: connect: bindService returned false for Intent { act=com.google.android.gms.analytics.service.START (has extras) }
Thread[Service Reconnect,5,main]: Connection to service failed 1
Thread[GAThread,5,main]: Sending hit to store
Thread[GAThread,5,main]: Sending hit to store
Thread[GAThread,5,main]: dispatch running...
Thread[GAThread,5,main]: User-Agent: GoogleAnalytics/2.0 (Linux; U; Android 4.1.1; en-us; Galaxy Nexus Build/JRO03O)
Host: www.google-analytics.com
GET /collect?[information collected]
Thread[GAThread,5,main]: Exception sending hit: HttpHostConnectException
Thread[GAThread,5,main]: Connection to http://www.google-analytics.com refused
Thread[GAThread,5,main]: sent 0 of 40 hits
Then it repeats everything again starting at "dispatch running..." every 30 seconds, which is the interval I set.
It isn't an internet problem, as my app connects to other websites just fine. The profile I have on the analytics website is for V2.0. It's been well over two days since I set this up.
What else can I do?
Upvotes: 1
Views: 2105
Reputation: 882
I noticed an error that said
Connection to www.google-analytics.com/127.0.0.1 refused
and I thought "That's odd, why would it be going to the localhost?" Then I remembered that I have a modified hosts file. It looks like the hosts file I put on my phone to block ads also blocks google-analytics. I've removed these entries and everything works fine. If you're having these troubles, check if your hosts file is blocking analytics.
Upvotes: 7