<script type="text/javascript">
function downloadCount(type){
var ajaxparameter="downloaded="+type;
var xmlhttp=new XMLHttpRequest();
var glurl="logger.jsp";
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
}
}
xmlhttp.open("POST",glurl,true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(ajaxparameter);
}
</script>
<td>
<a class="dnld" onclick="function handleDownloadLinks(event)
{
ga('send', 'event', 'Download', 'Click', 'ForwardIC_4.0.war');
};
downloadCount("ForwardIC_4.0.war");"
href="https://example.com/pub/infocenter/Forward/Release4.0/ForwardIC_4.0.war">
<img src="images/download.gif" alt="Download" border="0" style="margin-right:3px">Download</a>
</td>
I am trying to track the file names(which are being downloaded by the user) when they click on link. The page view is being tracked but the download event is not being tracked,i.e. the file name is not being reflected the GA console