Overview
Heap allows you to quickly surface and act on product insights, which empowers you to continually iterate on your product to grow your user base. When making code changes to your website or app, keep these recommended best practices in mind to ensure your events and reports will remain a consistent source of truth.
Before we begin, a brief refresher on the technical side of how events in Heap work:
Heap uses CSS selectors to define events. If an element associated with an event is modified, then the selector used to define the existing event could potentially stop working. This can be resolved in Heap using combo events once the code changes are made, though it’s something to keep in mind as you are making changes to your product.
Additionally, if your team relies on certain client-side APIs, such as heap.track(), heap.identify(), or others, your developers will want to make sure that updates to the product still have these APIs included.
Pre-code changes: identify events that will be affected
Prior to making code changes, it’s important to consider the parts of your product that these code changes will impact. Is this an underlying structural change that impacts the entire app, or an update to a specific feature? This information will determine how many event definitions may need to be updated after the release.
If you already have a solid data governance and event naming convention strategy in place, and things are categorized in an effective way, this will be easy for you. To learn more about recommended naming conventions for events, see the Naming Conventions section of our Events guide.
To confirm which event definitions will be affected, you can use Live data feed. Navigate to the area of your product that will change, interact with it in-app to send some events into Heap, then check the feed for if those events are defined.
We recommend prioritizing which events you should focus on first by reviewing your core reports and identifying which events are included in those, such as key conversion or activation events that you use to benchmark your KPIs.
Post-code changes: QA-related events
Once your code changes have been deployed, keep an eye on the inactive and unused definition lists to spot any events that may have been impacted by these changes and use the Event Repair Flow to fix them.
Alternatively, you can also use Live data feed to confirm that all of the interactions with the new part of your app are defined. If they aren’t, you can easily define them in Live View or via the Event Visualizer. You can also use these tools if you have an event definition that appears to have broken as a result of the release because the CSS was changed.
Since Heap retroactively autocaptures all events, it’s okay if you don’t have every single event defined right away – you can always define the event later.