views:

77

answers:

3

Hi all,

I've been segmenting my full referral path to the user defined value using advanced filters.

alt text

I would like that data, which obvious is the form of an URL to be clickable. Would even be better if it could open in a new window.

Anyone knows what I should feed the user defined value to get that behavior?

I've put up an image to better explain what I'm trying to do (sorry for the blur but it was the only the client allowed). What I'm trying to do is put the yellow part (the full link path) as an external link so that I can click on it and just visit the site that brought the user here.

Any thoughts on how to do it?

alt text

Please take into account that the text given in the example is extremely short. On 90% of the referrals google cuts down the link showing the full path on the title only:

<div class="a" title="http://www.example.com/vb/showthread.php?s=d0189c38"&gt;
    <div class="b">http://www.example.com/vb/show&lt;/div&gt;
</div>

Thanks!

+1  A: 

So you're not alone in expressing a need for this feature, as evidenced by the fact that several people, including myself, have developed Greasemonkey scripts to do exactly this.

The most-recently updated of these scripts is named Google Analytics Referring Source Detail Links, and was written by Erik Vold. The source is available at the script repository, UserScripts.org

The page i linked to above includes an 'install' button in the upper left-hand corner, which if clicked from a Firefox browser that has the Greasemonkey add-on, will install this script as a greasemonkey 'user script'.

If you don't want to do that (i.e., you want to modify it first, or you user a different browser, then you can get the source from the same page i linked to. Chrome, for instance, allows you to install Greasemonkey user scripts as extensions, although i have not tried this. Similarly, Safari has a Greasemokey-like script injector from which to launch this script.

doug
@doug thanks for your input! Actually that could be arranged this way even though all scrips pointed are now obsolete as Analytics has put a "Visit this referring link" on every link detail page. What I was trying to achieve was this done natively with filters. If that doesn't suffice an extension would work ok but it would have to work directly on the "Referring Sites" first page. I guess I may work out an extension of my own if no-one has made up the wheel on this...
Frankie
@doug this question pointed me in the right (and only) direction so the bounty is well deserved. Thank you doug.
Frankie
+1  A: 

Instead of a greasemonkey change (which would break every time GA changes its DOM, which is often), you could just create a custom script that does this for you. This has the benefit of being future-proof (particularly since the GA API requires explicit declared version changes to use newer API features or lose access to old ones). Further, you could avoid overloading the User Defined variables, and leave them open for other uses.

Both the source domain (ga:source) and the referral path (ga:referralPath) are exposed via the API.

So, all you'd need to do to get the above view (or something similar) the way you want it is as such:

  • Dimensions: ga:source, ga:referralPath
  • Metrics: ga:visits
  • Segment: gaid::-8 (referral traffic)
  • Sort: -ga:visits

Try it here.

Here's what it looks like: alt text

You could, using one of many popular Google Analytics libraries (here's one for PHP), just spit it out as such (pseudo-code)

<tr>
<td> <?php echo $referral['source'];?> </td>
<td> <a href="<?php echo $referral['source'] . $referral['referralPath'] ;?>" target="_blank"><?php echo $referral['source'] . $referral['referralPath'] ;?></a></td>
<td><?php echo $referral['visits'];?></td>
</tr>
yc
@yc Thks for your answer! I like your ideia a lot. Eventually this will be a more long-term solution because it requires the creation of a proper UI but is definitly something I should look into. Nevertheless one has to use the `ga:userDefinedValue` because the GA standard referral strips out the _GET specific part of the URL which messes a lot with forums and stuff (you know the forum from where the user came from, but you can't find the topic - for example).
Frankie
@yc thanks for your answer. It's a good one and, like said, probably the way to go. Right now, however, the UI for Analytics is way to important (with bounces, and charts and all) to be replaced by something we can do so we went script-wise. Nonetheless, thanks.
Frankie
A: 

There was really no good answer so I've made up an extension that you can install on Google Chrome to achieve this behavior.

It simply converts all the static text from "User Defined Value" into actual external links.

You can Install it from the Google Extensions page:

https://chrome.google.com/extensions/detail/dbbnhpimjhganelkoickiabfampiiagl

Hope this helps someone.

Frankie