victorhooi
Member
Posted 2 years ago #
heya,
Your Google Analytics for WordPress is really cool, particularly with the onclick tagging of outbound links. Huge timesaver.
However, it only tags WordPress-generated links - I'm wondering if it's possibly to extend it to tag *all* outbound links (e.g. in sidebars, widgets) etc.? Now, obviously, we could do this just with a bit of JS at the end - but is it possible with your serverside approach?
Cheers,
Victor
Hey Victor,
not really, as the content has to go through a WordPress filter to be able to do that. The r I've chosen NOT to use the js based addition of an onclick tag is because that disallows me the possibility of segmenting those clicks...
Cheers,
Joost
Luciano Passuello
Member
Posted 1 year ago #
Hi Joost,
I'm currently using Ultimate Google Analytics plugin (which is also server-based) and plan to dump it and use yours.
One thing that I can with UGA is to include outbound links in my sidebar widgets. All I need to do is to filter widget text by using UGA's filter:
add_filter( 'widget_text', 'uga_filter' );
Does your plugin offer similar functionality? Is there a ready-made filter I can use for widget_text?
Thanks!
Kennedy808
Member
Posted 1 year ago #
@victorhooi said "Now, obviously, we could do this just with a bit of JS at the end"
I'm looking at the general instructions on how to track outbound links with Google Analytics here, http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
Do I understand correctly that I can manually add this bit - onClick="recordOutboundLink(this, 'Outbound Links', 'example.com');return false;" - to my sidebar and widget links and they'll then be tracked by my analytics account?
anndonnelly
Member
Posted 1 year ago #
What's considered a WordPress generated link (sorry if I am being a bit dumb). If I put a link in the text of a post or a page, is that WordPress generated? Or is it just the navigation, which would be mostly internal links, anyway? I am doing a site for a membership organisation and need to track clicks to the members sites. Thanks.
anndonnelly
Member
Posted 1 year ago #
OK, I looked at the code output and the links I've added to have the tracking set up. Nice one.
What about links to email addresses? It'd be good to know how many people clicked to email the members. Can I manually add tracking code for that?
Luciano Passuello
Member
Posted 1 year ago #
Cool, version 4.0.2 now supports filtering sidebar widgets!
It also supports tracking mailto: links btw :)