How Viral Loops established a data system with Convex Works

Table of contents
Overview
Challenge: Every ad-spend decision at Viral Loops came down to its own acquisition numbers, and those numbers ran on a half-wired setup no one could fully trust.
Solution: We rebuilt how signups and purchases get counted: once, at the source, confirmed on the backend, so ads and product finally read the same number.
Result: Meta, Google and LinkedIn bid on conversions that actually happened, and Viral Loops had one answer to which campaign produced a paying customer.
Every ad-spend decision ran on numbers no one fully trusted
Viral Loops is a platform for building referral and viral campaigns with low to no code. By 2023 it was an established product with a lot of traffic, spending on Meta, Google and LinkedIn to bring people in.
Every decision about that spend came down to its own acquisition numbers: how many people signed up, how many bought, and from which campaign. Those numbers sat on a half-wired setup. Segment was in place, but not everything ran through it, the conversions were counted in the browser (where an ad blocker just deletes them), and each tool kept its own version. So no one could fully trust which campaign had actually produced a paying customer.
Capture every signup once, at the source
There is no point optimising ad spend on numbers that are wrong at the source. We captured every visit and signup once, cleanly, through a server-side layer, before anything was sent on. The site runs on Webflow, and its events feed that one layer instead of a dozen vendor scripts firing in the browser. Every number after that is built on this one record. Get it wrong here and everything downstream is wrong too.Confirm the signups and purchases on the backend
The two conversions that decide budget are the signup and the purchase. We confirm both on the backend, so a browser pixel that an ad blocker drops does not undercount them. Meta runs the pixel and the Conversions API together, and Google Ads and LinkedIn Ads read the same confirmed events. So the ad platforms optimise on real conversions, not a fraction of them.Put the ad platforms and the product on one set of definitions
A signup has to mean the same thing to the ad platforms and to the product. Every tool reads the same events through Segment, so GA4, the product analytics, and Meta, Google and LinkedIn do not disagree about what happened. One definition, one number. The team stops arguing about whose report is right.
One answer to which campaign produced a paying customer
The result was a system Viral Loops could act on. Meta, Google and LinkedIn bid on signups that actually happened. Ads and product read the same funnel. And there was one answer to which campaign produced a paying customer, i.e. not one number in the ad account and another in the product. The team could move budget and judge a campaign on data they trusted.
The stack
The measurement above runs on a larger data system. The full stack we built:
| Collection | |
|---|---|
| Webflow | The marketing site. Its events feed the collection layer. |
| Segment | Captured every visit and signup once server-side, then routed one shared set of event definitions to every tool. |
| Stripe | Purchases and paid plans, i.e. the paid-conversion signal. |
| Compliance | |
| Segment Consent Manager | Consent gating, added where there was none. A tool receives data only when allowed. |
| Distribution and activation | |
| GA4 | Web reporting on the same events. |
| Mixpanel | The product side: what users do after signup. |
| Meta (Conversions API) | Runs the pixel and the Conversions API together, confirmed on the backend. |
| Google Ads | Reads the same confirmed events. |
| LinkedIn Ads | Reads the same confirmed events. |
| ActiveCampaign | Onboarding flows triggered by product events. |
| Intercom | Customer messaging on the same identity. |
| Slack | A ping to the founders on every signup and purchase. |
A few principles guided the build
- Confirm what matters on the backend. The conversions that decide budget are confirmed by the server, not by a browser pixel that can be blocked or dropped.
- Collect first-party. The site sends to one first-party layer, not a dozen vendor scripts, so the data is harder to break and easier to govern.
- One set of definitions. Every tool reads from the same event layer, so the ad platforms and the product do not disagree about what happened.
Trust the numbers behind your ad spend
This is the kind of data system we build at Convex: the infrastructure behind the ad spend, built by people who have actually spent it. Start with an audit.