A tiny WordPress plugin to track events of link clicks in the main content area of the site. Install it and forget about it.
Links will show up under Events in the Analytics site, and will have a category of ‘Links’, a label of ‘PageID: CURRENT_PAGE_URI’, and the value of the href of the link being tracked.
Example of code added to properly formed URLs in main post content:
<a onclick="ga('send', 'event', 'Links', 'click', 'http://twitter.com/chris_dickow');" href="http://twitter.com/chris_dickow">@chris_dickow</a>
The above example assumes the href of the link is:
- Activate the plugin through the ‘Plugins’ menu in WordPress
- All done!
- How do I configure this?
Short answer: You don’t. There are no configurable options to this script, as it simply appends event tracker behavior to your links.
- What other data does it collect?
- What else does it do?
Contributors & Developers
“GA Link Tracker” is open source software. The following people have contributed to this plugin.Contributors
v2.2 – Fixed conflict with abbr tag
v2.1 – Minor bugfix
v2.0 – Updated to use Google’s newer analyitcs.js file
v1.0 – Initial release.