I want to see the screen resolutions more used by our customers.
Best answer by jonathan 15 March 2022, 17:49
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.
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!
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.
@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?
@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,
Hi! I set up the Snap Shot about 10:05 am this morning. At 11am, still seeing quite a bit of No Data for both Mobile and Desktop. Any guess why and potential fix if any? Thanks!
@jinahlee1234 Likely some caching, or maybe users with long running sessions that hadn’t pulled a new heapjs. How do things look now?
@jonathan Would ‘reject to cookies’ and ‘ask app not to track’ affect as well? In any event, significantly less No Data on Day 2. Thank you!
@jinahlee1234 It shouldn’t, as in those cases you probably really shouldn’t be loading Heap, so you shouldn’t just get (no data), you should get, well, no data.
This is a snapshot that doesn’t rely on timing so I’m not 100% sure why some data would be missing. First I’d check the % of pageviews that are missing the property (get a sense of scale, maybe it doesn’t matter), and then I’d look at pageviews with a filter for `Screen Resolution is not defined` and group by domain and path in case there are any commonalities or edge cases you’re missing.
The alternative for this use case would be asking your engineers to implement the addEventProperties API.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.