Question

The current code given by Google for ServerSide (JSP/PHP) tracking of mobile sites for non-javascript clients uses a blocking method: http://code.google.com/mobile/analytics/download.html#Download_the_Google_Analytics_server_side_package

Namely, if you are using a browser like Opera Mini which fetches all the images before the site is shown to the user then the loading time will be blocked by the ga.jsp script. i.e. the speed of your site to the user is now limited by the speed of your server to google's server to submit the analytics data.

Is there a version of the server side google analytics snippets that doesn't block in the incoming request?

Était-ce utile?

La solution 2

You will have to write a queue to put the incoming request data onto that will be processed off the current request thread by another pool of threads, thereby freeing up the current request to return the 1x1 tracking image immediately and make your page finish loading this tracking element much quicker.

This is a good idea for any element that can do it's work "later" and not have to block the loading experience and keep a connection open for longer than is necessary using more resources on the servers etc.

Autres conseils

Opera supports Javascript so there's no reason to use the server side code at all.

You just need the Server Side api for mobile browsers that don't support Javascript.

So you could whitelist browsers that you want to use Javascript and serve a different content for these browsers.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top