##What is this Block and what does it tell me?
Heap automatically captures user actions - clicks, taps, gestures, form submissions, page views - and allows you to add any additional custom properties you’d like. What makes Heap unique is that as analytics requirements continue to grow and change and new events are added to be tracked - these events are automatically updated historically, so you have a full view of the new event’s data.
Heap offers a product called Heap SQL, which provides retroactive data access in a managed Redshift data warehouse to all of these automatically defined and custom events. As changes are made to event definitions in Heap, these are reflected in the Redshift data warehouse too, going forward and retroactively.
The Heap Block provides a starting point to model and explore the data in Heap SQL, based on the components of the schema that are common across customers. These tables include:
The Events table contains a full event stream of all defined events. There are additional tables available for each event type custom to the customer. But the event stream table is useful for looking at combined behavior at the visit or user level, and contains columns common to all event tables, as well as the event type.
The session table contains a row for each user visit or session. This table is smaller than the events table, which can make querying for metrics at the session level more performant to analyze than the raw events table when querying for large date ranges.
The users table contains information about each of the users, and can be joined to the events or sessions table to provide more user level information about activity.
The Heap Block builds on these three tables to provide commonly sought after metrics when analyzing web or mobile activity. A sampling of these is documented below:
##Data type and technical info
The Heap Block works with the raw data Heap has captured in Amazon Redshift. There may be additional fields and/or tables that would be useful to add in to capture all custom metrics, but the Block only reflects fields and tables common across all customers.
Included below are some sample screenshots of a few out of the many dashboards that can be created with this Block:
##How do I Implement this Block?
The LookML for this block can be found in this Github repo. You can either download the entire block into your Looker application by following the directions outlined here, or selectively migrate pieces of the block by simply copying + pasting the block LookML into your Looker instance.
If you don’t have a Github account, we encourage you to create one for easy access to this block. If you don’t have access to the repo, or cannot make a Github account, please contact a Looker Analyst or email email@example.com and we’d be happy to help.