Forums

[Plugin: Google Analytics for WordPress] Problem with german GA and full URL tracking (2 posts)

  1. RokBlog
    Member
    Posted 5 months ago #

    Hi, first i would like to thank you for your great plugin. Very good work and exactly what i was looking for!

    I need to track the full URLs for outbound links. This works ok:
    onclick-Handler is set, GA receives the data, so everything would be fine, except:
    I use the german, localized GA, and when i click through "/outbound/" "/article/", the next clickable item is: "/http:/" and thats the problem. It should be "/http://". The only way to workaround is to manually add %2f in the URL-field of the browser to get the outbounding URLs displayed.

    Because this sucks, i hacked the googleanalytics.php to skip adding "http://" for full url tracking:
    In function ga_parse_link($leaf, $matches), i changed:

    } else if ($options['domainorurl'] == "url") {
    						$coolBit .= "javascript:pageTracker._trackPageview('".$leaf."/".$matches[2]."//".$matches[3]."');";
    					}

    to

    } else if ($options['domainorurl'] == "url") {
    						$coolBit .= "javascript:pageTracker._trackPageview('".$leaf."/".$matches[3]."');";
    					}

    Seems to work nice so far, but maybe there is an official workaround for this Problem?

    Kind Regards,

    RokBlog

  2. onelargeprawn
    Member
    Posted 5 months ago #

    Hi RokBlog,

    I've asked here for assistance here about an onclick tracking issues with GA and domains with two dots (e.g. .co.za) but no one has replied so I wonder if you can offer some assistance?

    My support topic is at http://wordpress.org/support/topic/274888

    Thanks in advance.

Reply

You must log in to post.

About this Topic