This project is read-only.
1

Closed

AnalyticsHelper.Track() does not consistently send events to Google Analytics

description

I've setup my app to work with Google Analytics using this package, up to the point where pageviews are viewable in Google Analytics. However, whenever I use the AnalyticsHelper.Track() method, there are times when no event is logged in Google Analytics and other times when it is. Is this a known issue, or should it be working?
 
Thanks.
 
Sample invocation:
try
        {
            throw new NullReferenceException("Some exception");
        }
        catch(NullReferenceException ex)
        {
            AnalyticsHelper.Track("Exception", ex.GetType().ToString(), DateTime.Now.ToString() + "..." + ex.Message, 1);
        }
Closed Nov 26, 2012 at 12:25 AM by AlexSorokoletov
Fixed in 2.0 release

comments

AlexSorokoletov wrote Aug 23, 2012 at 7:59 PM

It should be working as soon as you have internet connection. Otherwise it's saved to offline journal and then submitted to the server next time app has access to the internet.

bktek wrote Aug 23, 2012 at 10:23 PM

As far as I could tell, my connection was active the whole time - no events were logged in the offline journal either. The problem I'm seeing is that when BeginGetResponse is called on the web request for the Google Analytics url, the response handler is not always called - indicating that a response was never received from GA, which also means that it's possible the request was never received by GA at all (furthermore, the ones that never got a response never show up in GA dashboard).

The scenario I was testing involved 2 back to back events being sent to GA almost simultaneously (one a pageview, the other a custom event described earlier). Oddly enough, whenever I have Fiddler running to inspect the requests and responses, the problem goes away.

This may be a timing issue, or something with my own dev environment (VirtualBox - Win8 RP, VS2012 RC). In any event, it could require investigation to ensure reliable communication with GA.

AlexSorokoletov wrote Sep 3, 2012 at 12:50 AM

So, I will close it for a while. If issue remains on other environment, let's reopen this ticket

wrote Sep 3, 2012 at 12:52 AM

wrote Nov 26, 2012 at 12:25 AM

wrote Feb 14, 2013 at 8:30 PM

wrote May 16, 2013 at 10:15 AM