Live data feed provides you with a streaming, chronological, real-time view of all your raw and defined Heap events. This is a great tool for QAing that your Heap SDK is installed correctly and that your event definitions are working properly.
To see your Live data feed, click Live data feed under Data Management in the main nav. When you first launch the page, you’ll see events start to scroll automatically. You can pause and unpause the live stream by clicking the Pause/Resume button.
You can also clear your feed for testing by clicking the Clear Feed button.
Toggling Show only my events limits the events shown by two specific properties: browser and IP address. If other users have the same combination of IP address and browser details as you—which can happen, especially in a corporate setting where browsers are managed by IT and everyone is on the same physical network—their data will also appear in Live data feed when this toggle is switched on. The best workaround is to filter results by your User ID.
If you attempt to use Visual labeling and Live data feed at the same time, the Visual labeling mode will ignore Heap and prevent it from capturing your actions. Accordingly, Live data feed won’t show any actions either. This is to protect your data from getting muddled.
To use Live data feed to debug the events you’ve previously created in Visual labeling mode, see the QA Events with Live data feed section below.
Defining Raw Events in Live data feed
For each raw event, the Definition column will either show the name of a matching virtual event, or show undefined if the event is not yet defined as a virtual event.
To define new events from Live data feed:
- Click on the row of the raw event that you want to define to open up the Event Detail Pane
- Click Define Event
- Name your event and define it as a personal or shared event
- Add your event to a Category; you can also add a source, apply filters, and set Snapshot categories
- Click Define Event to save your new event definition
You can filter raw events by User ID, or by Session, Pageview, and Event properties. To add a filter, click the + Add filter button, choose the property, operator, and value you want to filter on, then click Apply Filters to start viewing the filtered live event stream.
Filtering by device type can be helpful to make sure your mobile Heap SDK is implemented correctly.
Filtering by event properties can be helpful for understanding if the CSS selector you are using for your event definition is working properly (i.e. that it’s not too specific or too broad).
QA Events with Live data feed
To QA event definitions using Live data feed:
1. Navigate to the Visual labeling page, then from the page you want to QA events for, click the Debug in Live data feed button at the top. This will take you to Live data feed and automatically filter based on actions taken only on your computer.
2. Click Launch your website. This takes you to a new tab where you can click around your site, and only the events coming from your machine will appear in live data feed.
3. On this page, take the action corresponding to the event that you just created. In this example, we are tracking clicks on the Free Trial button in our header.
4. Confirm in live data feed that the name of the event you just created appears under the Definition column.
5. As an additional QA, we recommend taking some actions that you want to make sure do not get counted as your event. Confirm that these actions do not show up with your event name under the Definition column.
If you are using IP exclusions and filtering out events from your office’s IP address range, you will not see live events when you filter for your User ID from your office.
One workaround to this is to connect to a Virtual Private Network using an IP address outside your company’s IP address range, then repeat the steps above.
Filtering for Mobile Sessions in Live data feed
To filter for mobile sessions in live data feed, complete these steps:
- Geolocation (Region and City)
- IP address (even better than geolocation)
- Device information (Platform and Device Type)
Source will be either Android or iOS (filtering this way is NOT advised when using live data feed for a React Native installation).
For apps on SDK versions below 0.9.0, you can define React Native events in live data feed.
To use live data feed effectively for event definition, you’ll need to identify your own User ID and use that as a filter to isolate events that you are triggering. The easiest way to find your User ID is to follow the instructions above for QAing events from Live data feed (Visual labeling > Launch >Debug in Live data feed).
Once events are filtered appropriately, you can click around in a simulator/emulator or on a live device. Events may take up to 15 seconds to propagate to the Heap app, so it’s helpful to be deliberate and patient to avoid generating too many events at a time.
Live data feed enables you to see the set of properties associated with a particular event (except for the hierarchy) and to identify defining characteristics of that event. For example, when you select the Touch on Press me event, click View All Properties and scroll down, you’ll see a captured Target Text property with the text “Press me”.
To define a new event with this event property, Click the Define Event button. The filters for Target Text equals “Press me” will be pre-populated for your event definition. Simply enter a name and click Define Event to save it.
Information about how to use hierarchies in event definitions is available in Managing React Native Event Definitions.