谷歌分析中的浏览器窗口大小?

use*_*832 5 google-analytics

我们正尝试在Google Analytics中捕获实际浏览器窗口大小的报告.我知道他们已经进行了页内分析,但这并不提供数据,只提供可视化.任何人都知道我们是否遗漏了什么,或者我们是否需要将其添加为自定义事件?

这真的有必要吗?

<script type="text/javascript">
 var width  = window.innerWidth  || document.body.clientWidth;
 var height = window.innerHeight || document.body.clientHeight;

 width  = Math.round(width/100)*100;
 height = Math.round(height/100)*100;

 var size = width + "x" + height;
 _gaq.push(['_trackEvent', 'Browser Size', 'Range', size]);
</script>
Run Code Online (Sandbox Code Playgroud)

小智 6

您需要添加自定义事件.我尝试了你的javascript,但它与Google Analytic的跳出率相混淆.您需要将opt_noninteraction变量传递为"true",否则Google会将该事件视为用户交互.跟踪浏览器窗口大小不是用户交互,应从跳出率calc中排除.

这是修改后的代码:

<script>
var width = window.innerWidth || document.body.clientWidth;
var height = window.innerHeight || document.body.clientHeight;
width  = Math.round(width/10)*10;
height = Math.round(height/10)*10; //Using a 10 pixel granularity

var size = width + "x" + height;
_gaq.push(['_trackEvent', 'Browser Size', 'Range', size,, true]); //don't count in Bounce Rate
</script>
Run Code Online (Sandbox Code Playgroud)


Ble*_*exy 0

您应该只能使用“受众”>“技术”>“浏览器和操作系统”下的屏幕分辨率报告,对吧?

浏览器和操作系统 - Google Analytics

  • 这也是我的想法,但是 JavaScript 变量会让我相信他想要跟踪浏览器窗口大小,而不是屏幕分辨率。 (2认同)