gpt4 book ai didi

google-analytics - AMP页面上有多个Google跟踪代码

转载 作者:行者123 更新时间:2023-12-03 16:03:27 24 4
gpt4 key购买 nike

有没有办法添加其他Google Analytics(分析)跟踪帐户?我一直在环顾四周,但我只发现示例,并且网站使用的是1个单一帐户:

<script type="application/json">
{
"requests": {
"pageview": "https://example.com/analytics?url=${canonicalUrl}&title=${title}&acct=${account}",
"event": "https://example.com/analytics?eid=${eventId}&elab=${eventLabel}&acct=${account}"
},
"vars": {
"account": "ABC123"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...

最佳答案

您可以复制两次粘贴amp-analytics标记。或者,您可以使用两个触发器。这里有些例子:

两个单独的标签:

<amp-analytics>
<script type="application/json">
{
"vars": {
"account": "ABC123"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...


<amp-analytics>
<script type="application/json">
{
"vars": {
"account": "PQR987"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...


两个触发器:

<amp-analytics>
<script type="application/json">
{
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
"vars": {
"account": "ABC123"
},
},
"trackPageview2": {
"on": "visible",
"request": "pageview"
"vars": {
"account": "PQR987"
},
},...

关于google-analytics - AMP页面上有多个Google跟踪代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40078429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com