Best Practices

Turning event data into actionable data | Census

Sylvain Giuliani
Sylvain Giuliani January 29, 2021

Syl is the Head of Growth & Operations at Census. He's a revenue leader and mentor with a decade of experience building go-to-market strategies for developer tools. San Francisco, California, United States

Thanks to the Cambrian explosion of marketing & analytics tools, it has never been easier to track events such as clicks, page views, or any activity in your app. Developers can easily drop in an SDK like Segment to track events and tie them to an identified user.

That means you can have a timeline in your tools that will look a little like this 👇

An event timeline in Intercom.io

We all feel good looking at this timeline; the problem is that we don’t learn much about our customers when looking at it. The other use case for event data is usually to trigger workflows. For example:

  • When a create an app event is triggered, start sending users our nurturing email campaign
  • When a user has visited our Enterprise Page, send an alert in our Slack Channel

Or you can create a dynamic list/segment based on that data, such as:

  • Users who have triggered the created an app event in the last 30 days
  • Users who have visited our Enterprise page this month

That’s all well and good, but it doesn’t get you very far... To really unlock the power of event data, you need to transform them into attributes.

From “meh” Data to Attributes

The real power of event data is when you aggregate or transform them into user or company attributes. For example, take the following event stream for a user of a collaboration tool (e.g. Figma)

With these events in our email marketing tool, we will welcome this user to our service and add them to our nurturing campaign. Maybe we will even send this user to our Sales CRM as a lead for our Sales team to manually check if they are a good fit for us. Or we will blindly prompt them to invite a collaborator during their 2nd week.

Simple aggregation => Unlock more power

If we take the exact same events and start aggregating and transforming them, we can do much more with this info and enrich our users' profiles. We can create fields such as:

  • # of Canvas created in the last 30 days (🤫 We have a whole post on this here)
  • # of Canvas shared in the last 30 days
  • Total # of collaborators invited
  • Last Canvas created at
  • Use Image Feature?
  • Last Image added at
  • Use Text Feature?
  • Last Text added at

This simple aggregation of event data unlocks tons of possibilities. Doing this is pretty straightforward with SQL, as it was built precisely for this task. If you have an Events table in your database (Segment can send all of the data to your warehouse for “free”), you can start doing this right now. 💪

Here is a query for our fictional SaaS company to create the  canvas_created_last_30_days and use_image_feature? fields


WITH canvas_created AS (
        SELECT
                u.id AS user_id,
                count(*) AS count
        FROM
                events e
                INNER JOIN users u ON u.id = e.user_id
        WHERE
                e.time > CURRENT_DATE - interval '30' day
                AND e.name = 'New Canvas'
        GROUP BY
                u.id
),
as_used_image AS (
        SELECT
                u.id as user_id,
                CASE WHEN max(e.time) IS NOT NULL THEN
                        TRUE
                ELSE
                        FALSE
                END AS "used_image?"
        FROM
                users u
        LEFT JOIN events e ON u.id = e.user_id
                AND e.name LIKE '%Image%'
        GROUP BY
                1
)
SELECT
        u.id,
        u.email,
        cc.count AS "canvas_created_last_30d",
        aui."used_image?"
FROM
        users u
        LEFT JOIN canvas_created cc ON u.id = cc.user_id
        LEFT JOIN as_used_image aui ON u.id = aui.user_id

This query returns a table of users with their aggregated attributes.

With this aggregated data, we can start segmenting our users. Instead of sending a basic “Welcome to our service” email campaign, we can use our data in new ways:

  • Send them a campaign that is more personalized like “Hey, you have been adding images to your canvas, that’s awesome! Did you know you could add text too? check out this tutorial video.”
  • Segment these users and start retargeting them on Facebook or Google to promote our Text Feature.
  • Reward power users with messages such as “you created 3 canvas in the last 4 days, that’s amazing! Fill in this form to get your free t-shirt.”
  • Alert your sales reps that one of their leads are actively using the product when they create 3 new Canvases.

Data Modelling => Super Attributes

That’s all great, but you know what’s even better? Computing brand new metrics based on these dumb events. For example, with the above event stream, you can start calculating new attributes such as:

  • Account health score
  • Product qualified lead
  • Daily Active Users per account
  • Monthly Active Users per account

Let’s take the Product Qualified Lead idea. Using our initial event stream, we could say that a qualified user is someone who had significantly engaged with our product, say for example:

  • completed the onboarding
  • created 3 canvas in one week
  • and shared at least one canvas

At this point, they would have used our product enough, and we can start selling them our “Team Plan” to generate more revenue. Again, creating this PQL score attribute in SQL is straight forward (we wrote about this topic previously).

💡 I have events, but they don’t look like the ones you have?

That’s ok. You should create an event tracking plan to enforce a schema. This topic will be the focus of a future post. For now, here are some high-level tips:

  • Create an event for any state change in your application: app created, app deleted, feature_X enabled, feature_x disabled, onboarding started, onboarding finished, became paid customer, payment success,  payment failed, invoice created, etc... you get the idea. If each event has a timestamp and is tied to an unique_id of a user/account, this will allow you to recreate the state of your objects at any time.
  • Create a spreadsheet (or Airtable like the cool kids) where you list for each event, the name, it’s properties, why you are trying it, etc. Iteravility is a product that focus on this (and more) or use one of these free templates.

From Attributes to Actions

Going from event data to attributes, we've already manage to do more things with our data. For example, segmenting users based on aggregate attributes or computed metrics.

Now the next step, as hinted through this post, is to put that data to work in your CRM, Marketing Automation Tools, Service Desk, Sales Engagement.

If we send the event data and new user attributes we created in this post to your tools, you can now unlock possibilities such as:

  • Sending qualified leads to your sales teams at the right time, thanks to your PQL Score
  • Routing & Prioritizing Support Tickets to the right agents based on the product features the customers are using and their spending level.
  • Alerting the Customer Success Manager of an account when the customer's usage drop.
  • Showing your Sales, Customer Success, and support teams how the customers are using the product in the tools they use without having 5+ tabs open to get the full picture.
  • Sending Personalized Email Campaigns at the right time and to the right users based on how they use (or not) your product
  • Creating Hyper-Targeted Campaigns on Facebook/Google/Linkedin to re-active leads, promote your new features (that they are not using yet)

... And that is just using the example event data that we aggregated in a blog post!

What's next?

Transforming event data to object attributes is only scratching the surface of what you can do with your data. If you are looking to do more with it, you should contact us.

We spend our days helping amazing companies like Figma, Notion, Drizly and Clearbit using their data to drive revenue.

Related articles

Product News
Sync data 100x faster on Snowflake with Census Live Syncs
Sync data 100x faster on Snowflake with Census Live Syncs

For years, working with high-quality data in real time was an elusive goal for data teams. Two hurdles blocked real-time data activation on Snowflake from becoming a reality: Lack of low-latency data flows and transformation pipelines The compute cost of running queries at high frequency in order to provide real-time insights Today, we’re solving both of those challenges by partnering with Snowflake to support our real-time Live Syncs, which can be 100 times faster and 100 times cheaper to operate than traditional Reverse ETL. You can create a Live Sync using any Snowflake table (including Dynamic Tables) as a source, and sync data to over 200 business tools within seconds. We’re proud to offer the fastest Reverse ETL platform on the planet, and the only one capable of real-time activation with Snowflake. 👉 Luke Ambrosetti discusses Live Sync architecture in-depth on Snowflake’s Medium blog here. Real-Time Composable CDP with Snowflake Developed alongside Snowflake’s product team, we’re excited to enable the fastest-ever data activation on Snowflake. Today marks a massive paradigm shift in how quickly companies can leverage their first-party data to stay ahead of their competition. In the past, businesses had to implement their real-time use cases outside their Data Cloud by building a separate fast path, through hosted custom infrastructure and event buses, or piles of if-this-then-that no-code hacks — all with painful limitations such as lack of scalability, data silos, and low adaptability. Census Live Syncs were born to tear down the latency barrier that previously prevented companies from centralizing these integrations with all of their others. Census Live Syncs and Snowflake now combine to offer real-time CDP capabilities without having to abandon the Data Cloud. This Composable CDP approach transforms the Data Cloud infrastructure that companies already have into an engine that drives business growth and revenue, delivering huge cost savings and data-driven decisions without complex engineering. Together we’re enabling marketing and business teams to interact with customers at the moment of intent, deliver the most personalized recommendations, and update AI models with the freshest insights. Doing the Math: 100x Faster and 100x Cheaper There are two primary ways to use Census Live Syncs — through Snowflake Dynamic Tables, or directly through Snowflake Streams. Near real time: Dynamic Tables have a target lag of minimum 1 minute (as of March 2024). Real time: Live Syncs can operate off a Snowflake Stream directly to achieve true real-time activation in single-digit seconds. Using a real-world example, one of our customers was looking for real-time activation to personalize in-app content immediately. They replaced their previous hourly process with Census Live Syncs, achieving an end-to-end latency of <1 minute. They observed that Live Syncs are 144 times cheaper and 150 times faster than their previous Reverse ETL process. It’s rare to offer customers multiple orders of magnitude of improvement as part of a product release, but we did the math. Continuous Syncs (traditional Reverse ETL) Census Live Syncs Improvement Cost 24 hours = 24 Snowflake credits. 24 * $2 * 30 = $1440/month ⅙ of a credit per day. ⅙ * $2 * 30 = $10/month 144x Speed Transformation hourly job + 15 minutes for ETL = 75 minutes on average 30 seconds on average 150x Cost The previous method of lowest latency Reverse ETL, called Continuous Syncs, required a Snowflake compute platform to be live 24/7 in order to continuously detect changes. This was expensive and also wasteful for datasets that don’t change often. Assuming that one Snowflake credit is on average $2, traditional Reverse ETL costs 24 credits * $2 * 30 days = $1440 per month. Using Snowflake’s Streams to detect changes offers a huge saving in credits to detect changes, just 1/6th of a single credit in equivalent cost, lowering the cost to $10 per month. Speed Real-time activation also requires ETL and transformation workflows to be low latency. In this example, our customer needed real-time activation of an event that occurs 10 times per day. First, we reduced their ETL processing time to 1 second with our HTTP Request source. On the activation side, Live Syncs activate data with subsecond latency. 1 second HTTP Live Sync + 1 minute Dynamic Table refresh + 1 second Census Snowflake Live Sync = 1 minute end-to-end latency. This process can be even faster when using Live Syncs with a Snowflake Stream. For this customer, using Census Live Syncs on Snowflake was 144x cheaper and 150x faster than their previous Reverse ETL process How Live Syncs work It’s easy to set up a real-time workflow with Snowflake as a source in three steps:

Best Practices
How Retail Brands Should Implement Real-Time Data Platforms To Drive Revenue
How Retail Brands Should Implement Real-Time Data Platforms To Drive Revenue

Remember when the days of "Dear [First Name]" emails felt like cutting-edge personalization?

Product News
Why Census Embedded?
Why Census Embedded?

Last November, we shipped a new product: Census Embedded. It's a massive expansion of our footprint in the world of data. As I'll lay out here, it's a natural evolution of our platform in service of our mission and it's poised to help a lot of people get access to more great quality data.