开发者

How to track iPhone orientation in google analytics?

开发者 https://www.devze.com 2023-01-09 02:47 出处:网络
We\'re getting ready to deploy a mobile version of our website and we\'d like to track the iPhone orientation within google analytics. I\'m guessing we should do this 开发者_C百科as a custom variable

We're getting ready to deploy a mobile version of our website and we'd like to track the iPhone orientation within google analytics. I'm guessing we should do this 开发者_C百科as a custom variable because I don't see any pre-defined way to track this under the mobile tab for analytics reports. I'm not sure how to detect the current orientation of the iphone when the page loads, however.

When searching for an answer to detect this I see a lot of suggestions for apps, but none for Safari when viewing web pages. Did i miss that question, or does anyone know how to detect iphone orientation within safari?

thanks in advance!


Edit: Mobile Safari Orientation events coupled with Analytics track JS events

I'm pretty sure the iPhone browser always reports the same display width (javascript:screen.width) regardless of orientation. This makes it impossible to track such data in MobileSafari. I'm looking for somewhere that can confirm this but you could always test on your own with your device or an emulator or emulator.


Same way you track screen resolution.

0

精彩评论

暂无评论...
验证码 换一张
取 消