Google.WebAnalytics.dll duplicates statistics

May 9, 2013 at 9:13 PM
Edited May 9, 2013 at 9:19 PM
Hi,

There is an issue with Google WebAnalytics: when tracking an event: two requests are made to __utm.gif instead of one, so all google statistics become duplicated.

I didn't find the source code of the Google.WebAnalytics.dll anywhere so I decompile it and found that the code uses the following in order to track:

public void Track(Uri url)
    {
       this.image.Source = new BitmapImage(url);
    }
This code issues 2 requests to the same __utm.gif probably because of the response that google gives to the first request.

If I use webclient instead, only 1 request as expected is sent to analytics.

public void Track(Uri url)
    {
        var webClient = new WebClient();
        webClient.OpenReadAsync(url, null);
    }
Can you fix this ?

Thanks,
Claudio.