Mike, a bit late on for me but where you are using jQuery for the $ phrase:
Have you embedded this code in the page's Head placeholder?
Are you called the jQuery library correctly (at all)?
Replace the "trackTheClick($(this));" phrase with a test "alert($(this));" to see if the clicking of a link activates the code call.

I don't know what your jQuery skill level is so may I suggest going to the jQuery site and following a few of their examples by running them in a Xara placeholder to check you have everything in place.

Acorn