从网页预加载内容是否会歪曲我的Google Analytics(分析)统计信息?(Does preloading content from a page skew my google analytic

编程入门 行业动态 更新时间:2024-10-22 23:47:00
从网页预加载内容是否会歪曲我的Google Analytics(分析)统计信息?(Does preloading content from a page skew my google analytics stats?)

我想自己写一个简单的脚本,它使用AJAX将我主要导航栏上每个页面的内容加载到当前页面上的隐藏div中。

这样做的目的是让我可以尽可能多地预加载我的重要内容,并在用户的计算机上缓存(希望),然后才能完成当前页面,然后继续前进。

我担心的是,每次访问网站时,对网站上的每个页面发出请求都会严重破坏我的Google Analytics(分析)统计信息的有效性。

AJAX如何与Google Analytics(分析)交互? 它是否被视为“网页访问”?

I'd like to write myself a simple script that uses AJAX to load the content from each page on my main navbar into a hidden div on the current page.

This is just so that I can preload as much of my important content as possible and get it cached on the user's computer (hopefully) before they've finished with the current page and want to move on.

I'm concerned that doing a request for every page on the site, every time someone visits, will really ruin the validity of my google analytics stats.

How does AJAX interact with google analytics? Does it count as a "page visit"?

最满意答案

如果您在不运行嵌入式脚本的情况下检索每个页面,则Google Analytics代码将不会运行,并且不应该算作页面视图。 我建议在检索每个页面后不要对代码进行任何操作(即不要将内容插入到隐藏的div中)。

If you retrieve each page without running the embedded script, then the Google Analytics code would not be run and it should not count as a page view. I suggest not doing anything with the code after retrieving each page (i.e. not inserting the content into a hidden div).

更多推荐

本文发布于:2023-08-05 06:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428862.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是否会   统计信息   加载   网页   内容

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!