Turns out with a little trickery it can be done.
https://support.google.com/analytics/ans...6920?hl=en
My adapted version:
<script>
/**
* Source:
https://support.google.com/analytics/ans...6920?hl=en
* Function that tracks a click on an outbound link in Analytics.
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
*/
var trackOutboundLink = function(event) {
var url = $(event.target).attr("href");
//Check if this is an out-bound link, and GA has been instantiated
if(typeof ga != "undefined" && !(url.startsWith("/") || url.indexOf("domain.com") > -1))
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
//Once the DOM has loaded, attach a click handler to all the available links
$("body a").on("click", trackOutboundLink );
</script>