【发布时间】:2019-06-10 20:41:00
【问题描述】:
我想知道如果我将所有 javascript 跟踪代码放在一个 <script> 中是否会有所不同,还是必须将其放在不同的 <script> 标签中?
例如:
选项 1:
<script>
/* Google Analytics tracking code*/
/* Intercom chat tracking code */
/* Facebook Pixel tracking code */
</script>
或
选项 2:
<script>
/* Google Analytics tracking code*/
</script>
<script>
/* Intercom chat tracking code */
</script>
<script>
/* Facebook Pixel tracking code */
</script>
这有关系吗?谢谢
【问题讨论】:
-
当然。前提是没有冲突的命名变量或函数。
标签: javascript jquery google-analytics facebook-pixel