Google Analytics doesn't register events in IE if link opened in new tab
August 8, 2014 11:43 AM   Subscribe

Is there any info on why Google Analytics doesn't register events in IE if the link is opened in a new tab?

Google Analytics registers events in IE, unless it's a link opened in a new tab (either by CTRL+click or by right-click/"Open in new tab").

That same link opened in IE in the same tab will register as an event.

That same link opened in a new tab in other browsers (FF, Chrome, Safari) will also register as an event.

Since (unfortunately) a large percentage of our traffic is still in IE, I've been asked to find info on this problem and possible ways to solve it. I'm not having any luck with it.

I've posted to the Google Products forums but it looks like some of those questions aren't getting answered, or aren't getting answered well, so I thought I'd try here too.

Any suggestions?
posted by johnofjack to Technology (4 answers total)
 
You could try the IE MSDN forum, or stackoverflow.com.
posted by jeffamaphone at 12:03 PM on August 8, 2014


Best answer: Is this for links to other places on your own site? If so, it sounds like IE isn't sending the same headers when opening a new tab as when opening the link in the same tab (my suspicion is that it doesn't populate the Referrer header, or doesn't send the same cookies, specifically). You might install Fiddler and figure out what's different between the requests you see between the two scenarios. Then, once you know what's happening, you can ask a more specific and better answerable question, because right now the answer is "I have no clue."

This stackoverflow question looks relevant.

If it's for links to other sites, then the answer is that browsers (not just IE) routinely bypass Javascript event handlers when opening new tabs, and there's not that much you can do about that aside from modifying the link to go somewhere you do control instead.
posted by Aleyn at 11:57 PM on August 8, 2014


Response by poster: Ah. It's for links to other sites.

Thanks!
posted by johnofjack at 4:21 AM on August 9, 2014


No problem. It's possible that the reason you're seeing this only in IE is because they're able to fake the new-tab behavior in the other browsers with a click handler that handles the CTRL-click case and uses window.open() to bring up the new tab; in IE, I believe window.open() opens a new window unless the user configures it not to, which is probably undesirable. However, I would expect that all browsers would bypass such handlers if the tab is opened by middle clicking or right-clicking and choosing "Open in new tab" from the menu.
posted by Aleyn at 1:46 AM on August 10, 2014


« Older Am I morally obligated to rent to someone after a...   |   Help me be a supportive wife when I am a mess Newer »
This thread is closed to new comments.