External link tracking when opening the link in a new window in Google Analytics?
- by evanmcd
OK, so this seems like a really simply problem, but I have yet to find a solution that accomplishes the following:
Opens the link in a new window
Tracks the event in GA (obviously)
Doesn't trigger pop-up blockers (uses target="_blank" instead of window.open)
Most of the code I've seen, including Google's, doesn't take into account the case of opening in a new window - they just window location.href.
Even GAAddons (http://gaaddons.com/), which charges for commercial use, doesn't seem to work for me.
Perhaps, I'm missing something simple - I'd be relieved if so and would thank profusely whoever points it out to me!
If no one is able to provide an example, I'll post some of the test cases I've created to illustrate the problem.
Thanks.