How Embeddables runs customer-facing funnel analytics on Jitsu and ClickHouse
Embeddables (YC S18) is an end-to-end platform that helps health and wellness brands build personalized digital experiences, from websites and intake funnels to checkouts and web portals, with analytics, experimentation, hosting and version control built in.
With Jitsu, Embeddables collects browser events from the experiences it hosts, shapes them with Jitsu Functions, and loads them into ClickHouse, which powers the analytics each brand sees in its Embeddables dashboard.
Event Streams
Website
Server Destinations
ClickHouse Cloud
Cloudflare R2
Volume
2 billion+
events per month
Introduction
The analytics in Embeddables are customer-facing. Embeddables collects activity on behalf of the brands that use it, not only on its own website, so a brand can log in and see what people are doing in its funnels. That ranges from an overview of funnel performance down to a single submission.
Jitsu has collected those events since 2022. Today it handles traffic from more than 1.5 million unique visitors a week across Embeddables experiences.
Success meant having a dependable event-collection pipeline that could grow with our customers without becoming harder for our team to maintain.
Jeremy Evans
Co-founder and CTO, Embeddables
The challenge
Before Jitsu, Embeddables collected events with a homegrown pipeline built on Firebase. Over time it became unreliable, and it was getting harder to scale and to maintain.
The team wanted to stop running that infrastructure itself. It still needed control over how each event is transformed, because every page view, button click and form submission has to become a record in the shape the Embeddables dashboard reads.
Why Jitsu
Jitsu took over collection and delivery, and kept the transformation logic in JavaScript the Embeddables team writes itself.
“The important combination for us is collecting browser events, running our own custom JavaScript transformations, and delivering the results to ClickHouse in batches. We can take an event such as a page view, button click or form submission and shape it into the records our product needs.”
Embeddables first ran the open-source version of Jitsu, then moved to Jitsu Cloud in 2022 so the team would not have to scale it themselves.
How the pipeline works
Every event takes the same path, from a visitor's click to the chart a brand sees. Jitsu Functions do the shaping, and Jitsu loads the results into ClickHouse Cloud in batches.
Changing ClickHouse tables without a gap in the data
Embeddables changes how incoming events are written to its analytics tables in one place: the Jitsu Function that sits between the browser and ClickHouse.
“When we updated our ClickHouse tables, we changed the function to write incoming data to both sets of tables while we validated the change. That let us keep collecting into the existing tables during the transition.”
A Jitsu Function that returns an array writes one incoming event as several records, and the JITSU_TABLE_NAME field sets the table each record goes to. A simplified version of the pattern, not Embeddables' production code:
A Function that returns more than one record must be the last Function in the connection's pipeline. If an earlier Function returns several records, processing aborts and no events reach the destination. Once the new table checks out, the first entry comes out of the array and the old table stops receiving data. More in the Functions docs.
Start capturing your data in 3 easy steps
01
Capture
As easy as adding a Google Analytics Tag. Capture events from your site, your app, and everywhere else your customers engage.