Ciao.
I am using an XWiki 9.4.
Is there any way to associate a specific javascript command to a link ?
In particular, I’d wish to track how many downloads of a pdf with Google Analitycs. I have to set the javascript code to add to the link, but I don’t understand how. The code is something similar as follows:
Click here to download [[User Guide>>attach:userguide.pdf||target="_blank"]] +
onClick = “ga( ‘send’, ‘event’, ‘pdf’, ‘click’, ‘download’ );”
Any ideas ?
Thanks.
Maurizio