22 days ago I shipped ?url=), and you're done. Clicks attribute to your publisher ID, you earn commission.
Samsung's feed broke this. Every Samsung click returned HTTP 500.
I dug in. The Samsung CSV URLs looked like this:
https://clk.omgt3.com/?AID=12345&r=samsung.com/vn/smartphones/galaxy-s24
That's not a Samsung URL. That's a Commission Junction tracker URL with the actual Samsung URL stuffed in the r= query param. CJ is a separate affiliate network — Samsung apparently runs through both, and AccessTrade is pulling
Samsung's CJ-wrapped feed.
AccessTrade's deeplinker saw the clk.omgt3.com hostname, decided "this is already a tracker," and routed it to a special /deep_link/v2/2306/ path that's supposed to chain trackers. That endpoint is broken — silent 500.
The fix is a 20-line static helper:
public static String unwrapCjTracker(String url) {
if (url == null || !url.contains("clk.omgt3.com")) return url;
try {
URI uri = URI.create(url);
String query = uri.getQuery();
if (query == null) return url;
for (String pair : query.split("&")) {
int eq = pair.indexOf('=');
if (eq > 0 && "r".equals(pair.substring(0, eq))) {
String inner = URLDecoder.decode(pair.substring(eq + 1), UTF_8);
return inner.startsWith("http") ? inner : "https://" + inner;
}
}
} catch (Exception e) { /* fall through */ }
return url;
}
Called on every URL before it goes into the affiliate wrapper. No-op for the 99% that aren't CJ-wrapped. Samsung clicks work now.
Lesson: when an affiliate network "auto-detects" something about a URL, assume it will do the wrong thing for at least one merchant. Write the unwrap helper proactively.
- I thought I had an egress problem. I had a caching problem.
Supabase's egress dashboard started looking ugly: ~8 GB/day. The free tier caps at 5 GB/month. I had a week before getting throttled.
My first instinct was "compress everything." I turned on server.compression=true in Spring Boot. Watched the dashboard. Egress didn't move.
This is when I realized I'd misunderstood the topology:
Browser ←--gzip-- Next.js ←--no gzip-- Spring API ←--no gzip-- Supabase
Spring's HTTP compression compresses outbound HTTP — Spring → Next.js or Spring → browser. It does nothing to the inbound traffic from Supabase, which is the raw JDBC protocol over a Supabase connection. That JDBC channel is what the
egress dashboard measures.
The real culprit was a single endpoint: GET /api/v1/locations/slugs — used by the Next.js sitemap to list every location URL. 16 MB uncompressed. Next.js was calling it on every sitemap request. No cache. Every Bingbot crawl, every
Ahrefs scrape, every sitemap ping = another 16 MB from Postgres → Railway.
Fix was two lines:
@Cacheable("active-slugs") // 6h Redis TTL
public List getActiveSlugs() { ... }
// Next.js sitemap
const res = await fetch(SLUGS_URL, { next: { revalidate: 21600 } }); // 6h
8 GB/day → 200 MB/day overnight.
Lesson: before optimizing what you think the bottleneck is, instrument the actual data path. HTTP gzip is great, but it can't help you on a wire it isn't on.
Traffic numbers — day 22
- ~50 organic users/day (hockey-stick juuust starting last week)
- ~921 cumulative users across 22 days
- ~43k indexable location pages + 90 deal hubs + 360 city×category cells + ~205 tool-hub pages
- All on free/cheap tiers — total infra spend ~$15/mo
What worked for SEO:
- Programmatic city × category landing pages
- Full JSON-LD (BreadcrumbList, ItemList, FAQPage, LocalBusiness with type-narrowing — Restaurant / Bakery / GasStation etc., not generic LocalBusiness)
- Bilingual hreflang VI/EN
- A simple Purchasing Power calculator for the Tools Hub — converts your salary into cost-of-living-adjusted equivalent across countries. Built it as a side surface, ended up being one of the highest-engagement pages.
What didn't work yet:
- Backlinks. Zero outreach so far. That's the next 30 days.
- Affiliate conversion tracking. The data's flowing, the GA4 event isn't wired yet.
What I'd do differently
- Set up Vercel/Supabase usage alerts on day 1, not "when the first warning email arrives." Both have webhook integrations I ignored.
- Write the affiliate URL unwrapper before integrating the first merchant. I would have caught Samsung in 5 minutes instead of 2 hours of "why is this one merchant returning 500."
- Cache anything that returns >1 MB before pushing it to prod. Even on staging, with one user (me), the moment a bot finds the sitemap you're cooked.
What's next
Three things in the next 30 days, in order of leverage:
- Google Search Console audit — find the queries ranking position 11–30 and pull them onto page 1 with small content additions
- Backlinks. 3 quality ones. (This post is one of them, hi!)
- Wire affiliate-click tracking to GA4 so I actually know which deals convert
If you want to poke at the live site, it's cheap-map.app — try the Purchasing Power calculator or browse today's deals. Feedback welcome in the comments — especially the "what would you have done differently" kind.
SOCIAL SHARE CARD GENERATOR