views:

99

answers:

1

Hi, Already posted this in Google Analytics help forum, but noone could help. Hopefully I have more luck here... :

I use Google Anlaytics asynchronous tracking for my pages. Works like a chram.

THE PROBLEM: Recently we added event tracking to monitor how often people click on download links on our pages. I encountered a problem with Firebug: it seems like the request for tracking is sent (i can see it in Firebug) but never ends as the "new" request for the file, which is in fact a link to a php-site with some params, seems to cancel it.

When clicking a second link to download a nother file on the SAME PAGE Firebug does not show the new request to Google but still the old request with a spinning wheel.

MY IDEA: 1. Use asynchronous tracking for pages 2. Use a JavaScript onClick-Function for the download links to track before file is downloaded 3. Track SYNCHRONOUSLY the events for the downloads in the onCLick Event-Handler 4. Return "true" in the JS function to trigger the actual HREF link to the PHP file resulting in the file download.

MY QUESTIONS: 1. Is it possible to mix asynchronous and synchronous tracking? 2. How can I do it? Is there a code sample somewhere? I couldn't find any in the Google help...

Does anyone have an idea?

A: 

Hi,

in case anyone ever runs into the same problem: the solution is to use and iframe for the file downloads. Like that, the download process starts in "a container" which does not interfere with the event tracking or other AJAX requests your might want to send.

If this helps you, please vote for the answer :-)

THX

Czar