Cross Domain Bug (with code fix)
-
There is an error in the code that processes cross domain links. An extra ” is being added to the end of the onclick code.
On line 367 in class-frontend.php:
$trackBit = ‘_gaq.push([\’_link\’, \” . $matches[2] . ‘//’ . $matches[3] . ‘\’]); return false;”‘;$trackBit is closed with a “
However, later on line 394, a second ” is added after $trackBit.
$matches[4] = ‘onclick=”javascript:’ . $trackBit . ‘”‘ . $matches[4];As far as I know this only affects cross domain. I think in other cases $trackBit is left open until line 394. It seems to work properly if I remove the ” from line 367 after return false;
http://ww.wp.xz.cn/extend/plugins/google-analytics-for-wordpress/
The topic ‘Cross Domain Bug (with code fix)’ is closed to new replies.