Hello . .
I assume the code for tracking is injected to click behaviour using analytics global variable and send a track request as an event.
I think we could add/fix the script to listen to the download elements and filter to only allowed extensions,
However I have another suggestion that may worth considering.
While it's effective to track using javascript, tracking via download request could give more accurate results,
We could inject the tracking to download request ( via server ), so everytime file is called/downloaded, it would record and sent the event to analytics
Please let me know what you think,
Thank you and regards,
Eni