Skip to content
Ayotl

← All notes

October 12, 2026 · In Mercadito

Recording the live menu without touching the pilot's data

Mercadito's reels had to show the real menu, with its photos, its prices and the order button. But every time someone opens it, the pilot writes it down, and in an append-only table what's written stays.

Mercadito's short videos for Instagram and Facebook had to be the businesses' real menus, not a mock-up: open one, choose, tap “Order on WhatsApp”. The trouble is that this is exactly what the pilot measures. Opening a menu sends a “view”; ordering sends an “order” with its items, which also feeds the business's “Best sellers”. Both go to menu_eventos, a table nothing is ever deleted from: a take repeated ten times is ten openings that never happened, forever in the series that's going to be analysed.

The recording is done with headless Chrome, driven by its debugging protocol frame by frame, and the same protocol lets you hold every request before it leaves. There's a single rule: anything that isn't a read never leaves the computer. It's answered right there with {ok: true}, the page believes it was recorded and carries on as usual. And the WhatsApp link is cut off with a 204: the page doesn't navigate away, and the link gives up the message the menu put together, which is exactly what one of the reels shows on screen.

on('Fetch.requestPaused', ({ requestId, request }) => {
  // el enlace a WhatsApp no sale: de él se lee el mensaje que armó la carta
  if (request.url.startsWith('https://wa.me/')) {
    registro.whatsapp.push(request.url);
    return cdp('Fetch.fulfillRequest', { requestId, responseCode: 204 });
  }
  // lo que no es leer se contesta aquí: la vista y el pedido nunca llegan
  if (!['GET', 'HEAD', 'OPTIONS'].includes(request.method)) {
    registro.contestadosAqui.push(request.method + ' ' + request.url);
    return cdp('Fetch.fulfillRequest', {
      requestId, responseCode: 200, body: btoa('{"ok":true}') });
  }
  return cdp('Fetch.continueRequest', { requestId });
});
And it isn't taken on faith: everything that isn't a read the page tried to send is logged separately, and if anything wasn't answered locally, the take is thrown away.

Five reels, zero events on the server: every take ended with its audit at “reached the server: 0”. Along the way came the traps of recording a page that isn't built to be recorded:

The underlying rule is the pilot's own: an instrument that watches itself. If the menu doubles as promotional material, promotion can't turn into noise in the measurement.

All notes