First time setting up a Snapshot? See our Snapshots overview guide for guidance on how to set these up.
You can capture screen orientation (on pageload only: APIs for tracking orientation changes are not supported across all popular browsers) via Snapshots. This is helpful for understanding how users are consuming your content. This gives you the data to understand if it’s worth optimizing for different views. Use the snapshot below to capture screen orientation:
Name: Screen orientation
JavaScript Snapshot: (function() { if(window.innerHeight > window.innerWidth){ return "Vertical" } else { return "Horizontal" } })();