duanlie7962 2014-10-27 22:48
浏览 22
已采纳

如何添加Google Analytics事件跟踪代码以下载php中的链接?

I Added below Google Analytics Event Tracking Code to download link

onClick="ga('send', 'event', 'Redirected2dl', 'QPRedirect');"

i Added the code directly to the php file as shown below . But when i tried to load the webpage the web page does not display!

<?php
$url = $_GET['url'];
echo 
'<p style="text-align: center;"> Your QuestionPaper Will Be Diplayed Here.
<a id="downloadLink" href="http://www.questionspaper.in/wait.php?url='.urldecode($url).'" onClick="ga('send', 'event', 'Redirected2dl', 'QPRedirect');"  >click     here to Download Your QuestionPaper</a>
if (isset ($url)) 
{
echo 
'<iframe ... src="http://docs.google.com/gview?url='.urldecode($url).'&embedded=true"     height="800" width="900" ></iframe>';
 }
 else {
 echo '<iframe ... src="
$url" height="1000" width="1000"></iframe>';
 }
?>

Can Anyone Help me to rectify the problem.Thank you

The above Php File can Be veiwed here http://questionspaper.in/myiframe.php?url=

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 W5100可以收广播,但是无法发出广播
      • ¥100 PCD点云排序和分割
      • ¥15 GG-CNN抓取数据集
      • ¥15 C++类和对象,多态性,继承,虚函数虚基类
      • ¥15 使用VS2019和Dev c++按%p输出地址,结果相差很大
      • ¥30 有偿解惑TINA老报错,求解惑
      • ¥15 arduino esp8266 编译问题
      • ¥15 metawrap画图报错
      • ¥15 怎样用提取的pdf信息重命名文件名
      • ¥15 如何用C语言编写一个程序来给一个数组添加转义字符