WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Google Analytics for WordPress] Fix for tracking outbound traffic, downloads, …

[Plugin: Google Analytics for WordPress] Fix for tracking outbound traffic, downloads, …

  • The tracking-gif (__utm.gif) from google analytics does not load in time for logging outbound traffic, downloads and all other sorts of exotic links. To fix this I changed the following:

    In function ga_get_tracking_link

    instead of:
    return $jsprefix . "_gaq.push(" . $pushstr . ")";

    I now use:
    return $jsprefix . "that=this;_gaq.push(" . $pushstr . ");setTimeout(function() { if (that.target=='_blank') {window.open(that.href);} else {location.href=that.href;} }, 200);return false;";

    I hope this makes somebody happy and of course that this bug gets fixed in future versions so I don’t have to manually update my code every time this plugin gets updated.

    – Alex de Vries

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

  • The topic ‘[Plugin: Google Analytics for WordPress] Fix for tracking outbound traffic, downloads, …’ is closed to new replies.