我想添加此行
setTimeout("__gaTracker('send','event','time','10 secs')",10000);
到这个javascript块的末尾(或者你称之为的任何内容)
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker');
__gaTracker('create', 'UA-55890449-1', 'auto');
__gaTracker('set', 'forceSSL', true);
__gaTracker('send','pageview');
</script>
但由于javascript块是插件的一部分,我的行将在下一个插件更新后消失。
是否可以在插件块之后在新的javascript块中添加我的行,我的行会影响前一个块的结果?所以它看起来像这样
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker');
__gaTracker('create', 'UA-55890449-1', 'auto');
__gaTracker('set', 'forceSSL', true);
__gaTracker('send','pageview');
</script>
<script type="text/javascript">
setTimeout("__gaTracker('send','event','time','10 secs')",10000);
</script>
或者我的行必须在插件的脚本块中吗?