Adding Google tracking tags to links

Currently there is no way of adding Google tracking tags to links without going into the HTML and placing a ‘Onclick’ on a link. Even when doing this if the link is changed in the Rich text editor the ‘Onclick’ tag is removed by the widget. Is there any way of building this type of functionality into the Rich text editor when creating links, so it is an additional option in the ‘Insert/edit link’ box.

This would be awesome!

On a side note I’m trying to just get the trackOUtboundLinks google function to work and I can’t seem to get it working.

Here is the resource file I followed

https://support.google.com/analytics/…

I have universal anaytlics and I made sure the correct GA tracking code is in on the page above my trackOutboundLinks function. I manually added the onclick events to my links and it has been 24hrs and google is still not picking these up and listing them under events.

My site is www.oldscollege.ca

any ideas??

Here is my setup

Ok I figured it out with Jeffs help! so js is really picky about the type of quotes that you use. The quotes that I copied when I copied the code of the Google help page, messed it all up.

Type the single quotes around the url param. Don’t use the copy and pasted ones they mess it up!

Now to figure out why the target="_blank" is not working after the onclick event =)