Track link clicks
Legacy Tracker Documentation
For the legacy tracker doc, check our guide here.
trackLink() is the function used to track clicks on links on your website. You can use it like this:
Parameters are defined below:
Implement trackLink after the tag
trackLink() needs you to pass the DOM elements which should have been loaded before. Therefore it’s better to implement trackLink() after the <body> tag while making sure that your DOM elements are already loaded.