The example code looks like this:
Code:
<script>
function cust_dwnld(n){
var f=["test.pdf","test.docx"];// put the file names of your attachments here and reference them in the button link (numbering starts at 0)
setTimeout(function(){window.open("index_htm_files/"+f[n],"_blank")},100);
alert("Put the code you want to be executed before the download here.");
}
</script>
It is placed at the HTML code (head) of the page (see attached screenshot) in the example, but it can also be placed in a placeholder or in an attached .js file (in the later case the <script> and </script> tags have to be removed).
To add your own code you have to replace the line "alert(..." but I really don't know what you have to place there for the analytic part.
Bookmarks