Skip to main content
The Customer Activity Stream contains all the raw data about your customer interactions. To perform any analysis, the first step is to find the right events and properties. All the information you need is in the activity and features columns of the customer_stream table.

Exploring Activities

The activity column tells you what action a customer took. To see a list of all possible activities in your stream, you can run a query to count the occurrences of each activity. This is a great way to get a high-level overview of what’s being tracked.
SELECT
    activity,
    COUNT(*) AS event_count
FROM
    customer_stream
GROUP BY 1
ORDER BY 2 DESC;
This will give you a ranked list of the most common events, which can help you identify the key activities for your analysis.

Searching in Features

The features column is a JSON object that contains rich metadata about each activity. This can include anything from the page URL a customer visited to the marketing channel that brought them there. If you know the name of a property you’re looking for (e.g., channel), but you’re not sure which events contain it, you can search within the features object.
-- Search for events that have a 'channel' feature at the top level
SELECT *
FROM customer_stream
WHERE features['channel'] IS NOT NULL;

-- If you are unsure about the exact key, you can search the string representation
SELECT *
FROM customer_stream
WHERE features::string LIKE '%channel%';

Other Strategies

If you’re still having trouble finding what you need, here are a couple of other strategies.
We’re here to help! If you’re stuck, reach out to us and we can help you find the events and properties you need for your analysis.
Sometimes the best way to understand the data is to look at where it came from. For example, if you’re looking for data from Hubspot, you can log into Hubspot to see what fields are available on a contact or company record. This can give you clues about what to look for in the features object.