Google Analytics(分析)Gtag选项未报告综合浏览量

时间:2019-10-17 02:48:25

标签: google-analytics

我有一个正在开发的一页网站。我像他们说的那样将Gtag代码放在html页面的开头部分。当我将代码放入并通过Google Analytics(分析)对其进行测试时,它似乎正在运行,但是它仅显示实时查看器。它尚未跟踪综合浏览量。无论有多少人看,它所显示的都是一个页面视图。有人可以帮我吗?

这是我在html头部的代码。

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-150005811-1"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'UA-150005811-1');
    });
</script>

我也不知道它是否会影响任何东西,但是有一些Javascript利用名为backstretch的脚本运行,每隔几秒钟就会更改背景图片。

<script src="jquery.js"></script>
<script src="backstretch.js"></script>
<script>
    $.backstretch([
        "images/spreader1.jpg",
        "images/feedlot3.jpg",
        "images/spreader2.jpg",
        "images/field1.jpg"
    ], {
    fade: 1000,
    duration: 7000
    });
</script>

以下是Google Tag Assistant报告中的一些图片。 Tag Assistant Report Google Analytics Report

1 个答案:

答案 0 :(得分:0)

在您的标头代码中,您错过了第二个脚本之后的结束<\ script>标记。添加它,然后查看数据