I need to insert a google-analytics code to monitor how many times a file (a video) has been downloaded. But since it is a sidebar link that is generated dynamically, I can not insert direct into the code.
onclick="ga('send', 'event', 'link','click', 'Download clicado');"
Can anyone give me a light on how I can do this?