It appears that you need to add an extra line of code to what the action provides so you will have to do this manually using Page>HTML markup. But remove the action first because the following includes what the action would place.
Paste code in before end Head
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
var pageTracker = _gat._getTracker('UA-XXXXX-X'); pageTracker._trackPageview();
})();
</script>
And then add the extra JS stuff
<script type="text/javascript">
function recordOutboundLink(link, category, action) {
try {
var pageTracker=_gat._getTracker("UA-XXXXX-X");
pageTracker._trackEvent(category, action);
setTimeout('document.location = "' + link.href + '"', 100)
}catch(err){}
}
</script>
So the finished markup should look like this
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
var pageTracker = _gat._getTracker('UA-XXXXX-X'); pageTracker._trackPageview();
})();
</script>
<script type="text/javascript">
function recordOutboundLink(link, category, action) {
try {
var pageTracker=_gat._getTracker("UA-XXXXX-X");
pageTracker._trackEvent(category, action);
setTimeout('document.location = "' + link.href + '"', 100)
}catch(err){}
}
</script>
Once you have done this you then need to add some code to the outbound links using the extended part of the Link dialogue box.
So with your link in the External box click on Extended and create a new name/value pair of
Name: onClick
Value: recordOutboundLink(this, 'Outbound Links', 'example.com');return false;
And do this for every link that you want to track.
Now I haven’t actually done this but it is worth trying on a test page.
Or try Clicky as H suggested - it may be easier!
D
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options