How we use Heap Snapshots for my business

  • 24 February 2022
  • 3 replies

Userlevel 2
Badge +2

Essentially snapshots are custom properties that we can capture and metadata additional metadata that we can't always do with just general Heap events, so we can do this by capturing the text or firing or javascript to capture the to do an API call to capture this metadata.


There are several ways to do that, and Heap has some great documentation and more that explains how to set up those API calls whether you're trying to capture things like screen dimensions, so this is more for like designers and product managers who are trying to optimize their website.


Snapshots give a better experience for knowing what what devices and people are coming onto your website and how larger screens are optimized for experience. There are other things you can do like capturing time zones to GEO locate where your customers are coming from who are visiting your website, there are other additional API calls, we can set up such as scroll depth and what image types people are clicking on.


The only thing that I’ll call out about snapshots is that it is not retroactive so it's something you have to think about proactively. 


So if there's anything of interest such as the API calls I'm not a javascript expert or anything but Heap does a great job of providing examples and documentation on how to set those up.


And then there's what we find most important at my company: scroll depth or scroll tracking to see how far people are willing to scroll through for each pages or each type of page, whether it's a category page or a product detail page.


Here are some examples where we borrowed some of this this code from Heap: We set up an event called any page view so anytime someone fires a page view on our website, we can capture the scroll depth of that user on that page; essentially what this code does is it splits the scroll height into 10s so into decimals, and each time someone scrolls past 10% it'll fire this event, here or there.



Another thing that we have used snapshots for is to capture emails when someone's about to check out. So many times, you have a lot of drop off between each step of the funnel when it comes to checking out so just so sometimes a customer would enter the email and then leave their session or never come back, so for us having the snapshot setup to capture that email allows us to re-target those customers.



One more example is using snapshot to track the keywords in product search, based off the keywords that the customer searches. We can then analyze that event to see how trends are changing. For example if we were to see a huge spike in searches for “Pearl,” we’d be able to prepare our stock accordingly.

3 replies

Userlevel 1
Badge +1

Thanks for sharing how you are using Snapshots! They are a great way to enrich our autocaptured data set.


Hey David, would you mind sharing how you used snapshot to track keywords?

Userlevel 4
Badge +3

Hey David, would you mind sharing how you used snapshot to track keywords?

@mstaffordHW Usually the selector used to define a search event will be the same selector used to capture the keywords, because the input field changing when the user searches is the same input that contains the value being searched. 

So if your search bar had an id of search:

This doc on creating and managing snapshots shows how to do this in the Event Visualizer if you’re more comfortable with that tool.