Notes from building an AI design collaborator · part 14
Every modal in our app shared one URL. Our analytics couldn't tell them apart.
· 3 min read
Our product runs a lot of its life inside modals. Open a payment, reconcile a deposit, add a bank account, half the real work happens in a dialog that pops over the page. And every single one of those modals lived at the same URL as the page behind it.
Which meant our analytics were blind to all of it. Every modal open looked like the user just sitting on the dashboard. We had a busy, important part of the product that, as far as our data was concerned, didn't exist.
Give the modal a URL
The fix sounds trivial. Give every modal its own URL. Open the transfer modal, the address bar gets a little tag saying which modal is open. Now the modal is a thing you can point at, filter on, build a funnel from. A dialog that used to be invisible becomes a first-class, measurable surface.
Simple idea. The gotchas are where it got interesting, and where I'd save you some time.
The gotchas nobody warns you about
The first one nearly fooled me completely. We added the URL tags, opened a modal, and no pageview fired. The analytics library treats a change to that little tag as "same page, nothing happened," so opening a modal recorded nothing at all. The whole scheme looked broken. It wasn't broken, it just needed us to tell the library that yes, this counts as a view. If you do this and see zero events, that's almost certainly what's happening. Don't panic, don't rip it out.
The second one was quieter and nastier. The tags started stacking. Open one modal, then another, and instead of replacing the first tag the URL kept both, then three, then a growing pile. So a funnel built on those URLs would show people entering step one and then apparently vanishing, because by step two the URL was some compound thing that matched nothing. A clean-looking chart showing catastrophic drop-off, and it was a measurement bug, not a user problem. That's the sort of thing that gets a real feature killed in a review by someone who trusts the chart.
There were smaller ones too. A modal whose tag didn't match its name, so you'd filter for the thing and get nothing. Tags that were written to the URL but never read back, so you couldn't deep-link to a modal or reload into it. Each individually minor, each capable of quietly lying to you.
The one line I'd tattoo on this: if you can't address it with a URL, you can't measure it, and you can't link to it. Modals, wizard steps, side panels, anything that changes what the user is looking at deserves its own address. It makes the invisible parts of your product measurable and shareable.
Just go in knowing the tooling was mostly built for pages that fully reload, and modals aren't that. Confirm your pageview actually fires. Make the tag replace, not stack. And treat any funnel that shows a perfect cliff with suspicion, because the most confident-looking chart is often the one measuring your instrumentation instead of your users.
Part of a series on building an AI collaborator for our design team at Xflow. Each post stands on its own.
- analytics
- product-design
The rest of Notes from building an AI design collaborator
- 1. I stopped describing my product to AI. I just gave it the HTML.
- 2. I gave the AI my design process, not my design decisions
- 3. I turned my design process into a dozen small skills, not one giant prompt
- 4. I built a free tool that gives your AI your real product
- 5. I taught the AI to push designs into Figma. Then it quietly stopped.
- 6. We rebuilt our Figma design system out of the code, not the other way round
- 7. We ran our design process on itself, and it broke in useful ways
- 8. How do you teach an AI your taste?
- 9. It worked great on the smart model. Then I ran it on a cheaper one.
- 10. The AI told me our brand colour with total confidence, and it was wrong
- 11. A screen list lies. I found a whole feature I didn't know we shipped.
- 12. Our documentation updates itself, because updating it is the AI's job
- 13. I sat down to turn my workflow into a swarm of agents. Most of it refused.
- 15. My AI's rules only worked because one tool bothered to read them
- 16. Six designers, one GitHub account, and a script that saves us from ourselves
- 17. "Out of scope" usually means "we'll repaint this in six months"