Skip to content
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
  • Home
  • Developers
  • API
  • Releases
  • Community
  • University
  • Status
Home Data Types Snapshots Capture Orientation via Snapshots
Getting Started Session Replay Data Management Data Types Charts Chart Examples Dashboard Templates Analysis Guides Administration Integrations Heap Connect Data Privacy

Table of Contents

Was this article helpful?

Yes No

Thank you for your feedback!

Capture Orientation via Snapshots

This doc is for: Admins Architects

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" } })();

Was this article helpful?

Yes No

Thank you for your feedback!

Last updated April 5, 2023.

snapshots
  • Blog
  • Partners
  • Legal
  • Security
  • Terms
  • About
  • Careers
  • Privacy
  • Contact Us

© 2023 Heap, Inc.