Quantcast
Channel: Yungsang.com » Uncategorized
Viewing all articles
Browse latest Browse all 11

Content Drilldown of Google Analytics for WP

$
0
0

I use Google Analytics AIR with Google Analytics for WordPress.

Google Analytics for WordPress automatically generates a click action to track downloading and outbound traffic.
It is very useful!

But Content Drilldown in the Google Analytics web site and the Google Analytics AIR show just “/http:/”.

So I patched googleanalytics.php of the Google Analytics for WordPress 2.5.3 (the latest version) a bit as below.

line 399:
$coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$leaf."/".$matches[3]."');\"";line 448:
$url = str_replace('http://',"",$matches[2]);
$coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$options['comautprefix']."/".$url."');\"";

line 464:
$url = str_replace('http://',"",$bookmark->link_url);
$bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackPageview('".$options['blogrollprefix']."/".$url."');";

It seems to work fine so far.
But no big traffic on my site at all. :)

Update: 2015.10.1
I’m sorry that there were some non-ascii chars(’, “) in my script.
It is fixed now.


Viewing all articles
Browse latest Browse all 11

Trending Articles