Skip to content

A little script to track outbound links on a page using event delegation

Notifications You must be signed in to change notification settings

nickski15/ga-js-outbound-link-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ga-js-outbound-link-tracking

A little Google Analytics script to track outbound links on a page using event delegation

Getting Started: You need to host the file outbound.js on your server

Then add the following code to you page:

<script src="outbound.js"></script>
<script>
var _gaq = _gaq || [];
_gaq.push(trackOutboundLinks());
</script>

To set debug use:

_gaq.push(trackOutboundLinks({'debug': true}));

This prevents the outbound links from working and output the command sent to Google Analytics to the console.

About

A little script to track outbound links on a page using event delegation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published