views:

55

answers:

2

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 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!

+1  A: 

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.

ryan
I think this is probably what we'll do, but we'll track it as an event instead of a pageview. Thanks!!
Sarah Jean
A: 

Same way you track screen resolution.

our analytics data shows two screen resolutions for iphone visitors, but they don't make sense to me because they're not the same two numbers reversed. We get:320x396 and 320x480. It's never 480x320 or 396x320. Is there something I'm missing here?
Sarah Jean