Case study
Dynamic Link Generator
Half the emails per campaign and no stored links at all, by routing on subscriber data we already had.
Results
- 7
- Zero
- 20
Figures are counts or floor values, shown this way to respect company confidentiality. Send counts and routing logic are exact. The tool went live one month before this was written, so the campaign count is an early number rather than a track record.
The challenge
Every button in every email pointed at a stored link, held by a third-party service that guessed the reader’s location and redirected them. That grew past 100K links, and a site restructure broke nearly all of them at once. The library was also about to move to a new provider, which would have carried the problem along.
Constraints
Two conditions shaped the work.
- Technical Route on the data we already had
The only routing signal was the subscriber record, and the two audiences carry different fields: sellers have a language on file, customers don’t.
- Technical · Scope A wrong link fails silently
A non-technical team pastes a block of code into an email. A bad link throws no error. It sends someone to the wrong country’s store.
Approach
The real question.
We sent 14 emails per campaign, one per market, with the same content. Only the links differed. So the question was never how to manage 100K links. It was what would let one email serve every market in its group.
Options I weighed.
- Not chosen:
Port the links and clean up later. It carries the problem into the new system.
- Not chosen:
Ask engineering for an API and a database. Once scoped, the problem didn’t need them.
- Not chosen:
A spreadsheet or snippet library. Cheapest, but it routes every request back through me.
What I picked.
A fourth option: build the routing into the send. The subscriber record already carries market and language, so the link is assembled when the email sends and nothing is stored.
The discovery
What the data already knew
Nobody had looked closely at the subscriber records, because everyone assumed this needed a developer. The market groups already existed in how the email team segments, and many links needed no routing at all.
- A stored link per call to action, per email
- A vendor guessing at location from an IP address
- One email per market, from a shared template
- No stored link at all, assembled at send time
- Routing from the market and language on file
- One email serving every market in its group
The duplication was a link problem that had been filed under content for years.
- One country No routing needed. A plain address does the job.
- its store
- By country One branch per market, and a default for everyone else.
- market store
- market store
- market store
- fallback store
- By country and language A second branch inside the market that speaks more than one language.
- market store
- bilingual market
- language store
- language store
- fallback store
- fallback store
Solution
Three steps, and nothing left to store
One page path in, a ready-to-paste link for every market group out.
- Set up
Pick the audience, name the link and give it one path.
- Preview
A plain table of where each market’s link goes, fallbacks included, so nobody reads code to check it.
- Result
The output blocks, each labeled as routed logic or a plain address.
*|IF:MARKET=A|* <a href="https://store-a.example/shop/new-collection">Shop the new collection</a>*|ELSEIF:MARKET=B|* *|IF:LANG=FR|* <a href="https://store-b.example/fr/shop/new-collection">Shop the new collection</a> *|ELSE:|* <a href="https://store-b.example/shop/new-collection">Shop the new collection</a> *|END:IF|**|ELSE:|* <a href="https://store-a.example/shop/new-collection">Shop the new collection</a>*|END:IF|* Handoff
Built for people who can't debug it
Every branch gets a fallback. A blank or unexpected country used to get a dead link. Now the worst case is the market group’s main store.
The instructions ship inside the output. The last step says how to paste each block and names the one action that breaks it.
- Guide A how-to that answers the next question A written walkthrough with screenshots, and who to contact when segmentation changes.
- Logic Editable without a developer The routing sits in one file, so a strategy change is an afternoon, not a ticket.
- System A base for the next tool A small design system sits underneath, and more internal tools now build on it.
We may change email providers again, so simple and adaptable was a requirement I set.
The tool
Three steps, start to finish
Set up once, check where every link resolves, then paste.



What I'd do differently
Understand the data instead of working around it. Geo-detection avoided what we already knew about people. The same logic that picks a store can pick a language, which could take it from seven emails per campaign toward four. That work has not happened yet.
Map the whole workflow with the team that owns it. My first test emails did not work, and we spent time untangling logic together that we could have spent building.
Knowing what to ask for is most of the problem. Our backend team delivers exactly what you request, so if you don't know what data exists, you get gaps.