Skip to content

Instantly share code, notes, and snippets.

@nalanj
Created May 26, 2011 18:20
Show Gist options
  • Select an option

  • Save nalanj/993699 to your computer and use it in GitHub Desktop.

Select an option

Save nalanj/993699 to your computer and use it in GitHub Desktop.
Tracking Click Events for Downloads
<html>
<body>
<a id="download-link" href="download.pdf">Download!</a>
<script type="text/javascript">
$('#download-link').click() {
_gaq.push(['_trackEvent', 'Downloads', 'Downloaded', 'download.pdf');
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment