Solved

Is it possible to group by screen resolution in Heap?

  • 15 March 2022
  • 5 replies
  • 452 views

Userlevel 1
Badge

I want to see the screen resolutions more used by our customers.

icon

Best answer by jonathan 15 March 2022, 17:49

View original

5 replies

Userlevel 5
Badge +3

Hey @Lori! Good question. We don’t provide this out-of-the-box but you can capture it using our Snapshots feature, which lets you attach additional data to events. 

Snapshots get fired when a Heap event is fired. You can think of it as a kind of tag manager where the event is the trigger. Here’s the steps to capture Screen Resolution.

  1. You want this data to be captured on every page, so you need to have an event that fires on every page. You can do this with the `*` wildcard character. 
  2. You can access the screen width and height via the `screen` object. You can join width and height together to return a Screen Resolution property. 
window.screen.width + ' x ' + window.screen.height

Here’s the finished product.

 

You can find other interesting Snapshots examples in our developer docs.

Hope this helps!

Userlevel 1

Hi, thanks for sharing this! Is anyone also experiencing getting results, where the majority reads as “no data”? I’ve set up the snapshot following the example above, and it looks like it works just fine, but I’m for sure missing something.

 

Could you provide an example of how to use the Screen Resolution Property correctly as part of a chart to include on a Dashboard? I’m struggling to understand how to correctly leverage. 

 

Userlevel 4
Badge +3

@werku It’s important to note that snapshot properties only begin capturing data from the moment they are created (they aren’t retroactive like some of Heap’s other autocaptured data). If you had just set it up, it may just be that the date range you used includes a large portion of traffic that occurred before the snapshot was setup. 

Could that be what’s happening here?

Userlevel 4
Badge +3

@ikonik Once you have setup the snapshot to capture your users’ screen resolution, you can use it just like any other property in Heap. 

A common analysis would be something like the below in the Usage Over Time module (you would get an output that looks very similar to the one @werku shared above. Essentially you want a count of pageview grouped by your newly created screen resolution property,
 

 

Reply