In the competitive world of B2B SaaS, understanding your customers is key to success. But how do you go beyond individual user behavior and gain insights into how companies interact with your product? The answer lies in company-level analytics, and this blog post will guide you through setting up a robust event-tracking system using RudderStack and Google BigQuery to achieve just that.
While individual user data is valuable, B2B SaaS businesses often need to understand how entire organizations use their product. This includes tracking:
By analyzing data at the company level, you can identify trends, tailor your marketing efforts, and optimize your product for specific customer segments.
RudderStack is an open-source Customer Data Platform (CDP) that simplifies data collection and routing. It acts as a central hub, capturing events from your website, app, and servers, and sending them to various destinations, including your data warehouse.
Google BigQuery, on the other hand, is a powerful, serverless data warehouse that can handle massive datasets with ease. It's the perfect place to store and analyze your event data, especially when dealing with the volume and complexity typical of B2B SaaS.
Here's a step-by-step guide to get started:
Now, let's add the crucial "group" information to your events. This allows you to associate users with their respective companies and perform company-level analysis.
RudderStack provides the group call for this purpose. Here's how it works:
Example code (JavaScript):
// Identify the user
rudderanalytics.identify('user-123', {
email: 'john.doe@example.com',
name: 'John Doe'
});
// Associate the user with a group
rudderanalytics.group('company-abc', {
name: 'Acme Corp',
industry: 'Technology',
employees: 500
});
Once you have events flowing into BigQuery with the "group" information, you can start performing company-level analysis. Here are some examples:
See what companies are using "create_team" feature the most.
SELECT g.name, COUNT(*) AS event_count
FROM `test_events.tracks` AS e
JOIN `test_events.groups` AS g ON e.context_group_id = g.group_id
WHERE e.event = 'create_team'
GROUP BY g.name
ORDER BY event_count DESC;
The example query returns statistics about "Create Team" event by organization:
SELECT g.name, MAX(g.timestamp) AS latest_timestamp
FROM `test_events.tracks` AS e
JOIN `test_events.groups` AS g ON e.context_group_id = g.group_id
WHERE e.event = 'trial_ended'
GROUP BY g.name
HAVING COUNT(*) > 1
ORDER BY latest_timestamp DESC;
The example query returns organization names for companies that have ended the trial period associated with the latest event timestamp.
By combining RudderStack's event tracking capabilities with BigQuery's powerful analytics engine, and incorporating the "group" dimension, you can unlock a treasure trove of insights into your B2B SaaS customers. This data-driven approach empowers you to make informed decisions, optimize your product, and drive sustainable growth.
If you want to skip the analytics, writing SQL queries and stop waiting days for product growth insights try GrowthCues instead. It connects with your RudderStack + BigQuery stack in a swift and delivers you with product growth insights in 30 minutes!
Take care 👋,
-Toni / Builder of GrowthCues