Hi,
I've noticed that external hyperlinks targeting a new window (< a href="somePage.html" target="_blank" >) is wrongly loading the target content page into the parent caller window together with the new opened window which should happen only in the new window but not in the parent caller.

After doing some investigation I found out that this line here| setTimeout('document.location = "' + this.href + '"', 100); | located at line 54 in googleanalytics.js is the culprit.

I am not quite sure what would be the correct syntax in order to avoid this problem but know that commenting out that line fixes it. Apparently, by commenting it out, may cause google analytics to miss out on an user click if they click on an external link before the google analytics scripting code had been loaded at the page bottom. Well too bad!!! :)

If anyone knows how to adjust the above code line for it to function correctly (load only the new window as it should be the normal behavior for _blank), please let us know.

Cheers,

Comments

hass’s picture

Status: Active » Closed (duplicate)
FranciscoLuz’s picture

@hass
Can point out the duplicated thread please.

FranciscoLuz’s picture

Status: Closed (duplicate) » Active
hass’s picture

Status: Active » Closed (duplicate)
nicolailai’s picture

"Disable 'Track outbound links' then target="_blank" works normally"
http://drupal.org/node/1057688

anrikun’s picture