Forum Moderators: open
The Google Analytics JavaScript function utmlinker allow to track users that spans across multiple sites. The method that they gives us to call the function is this one:
<script type="text/javascript">
document.write('<a href="javascript:__utmLinker(\' [secondsite.com');">Log...] in Now</a>');
</script>
<noscript>
<a href=" [secondsite.com">Log...] in Now</a>
</noscript>
Now, my question is: Is there a way to call the utmlinker function without having to document.write the whole <a> tag? This is not a SE friendly way, so I would really prefer to be able to do something like:
<a href=" [secondsite.com"...] onclick="_utmlinker (this)">Log in Now</a>
Altough I'm pretty sure this won't work, I can't imagine there is no alternative to this...
Help anyone?
Thanks