<script type="text/javascript">
\t function downloadCount(type){
\t \t var ajaxparameter="downloaded="+type;
\t \t var xmlhttp=new XMLHttpRequest();
\t \t var glurl="logger.jsp";
\t \t xmlhttp.onreadystatechange=function()
\t \t {
\t \t if (xmlhttp.readyState==4 && xmlhttp.status==200)
\t \t {
\t \t }
\t \t }
\t \t xmlhttp.open("POST",glurl,true);
\t \t xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
\t \t \t xmlhttp.send(ajaxparameter);
\t }
</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>
我想跟踪的文件名(这是被用户下载的),当他们点击链接。 正在跟踪页面视图,但下载事件未被跟踪,文件名没有被反映在GA控制台上
你有没有实现的情况下对文件下载跟踪?如果是,请提供代码,以便我们帮助您 – Igneel64
我已附上代码。请让我知道是否需要进行任何更改。 –