04 · UNDER THE HOOD
Mercado de Semillas
Mercado de Semillas is the store I have run since 2020, and lately my lab for data-driven ecommerce. These are the pieces I built after the storefront was already live.
1. Measurement that can be trusted
The store sends ecommerce events through Google Tag Manager to GA4 using the standard event names, so GA4's monetization reports fill themselves in without custom configuration.
- →view_item, add_to_cart, begin_checkout and purchase, plus view_promotion and select_promotion for the home hero.
- →Hero attribution: when someone taps a promotional slide, the site remembers it for seven days. If they buy, the order carries which slide it came from, and an admin report lists orders and revenue per slide independently of GA4 and ad blockers.
- →A guard against double counting: the site loads GA4 either directly or through GTM, never both, because both would count every purchase twice.
- →A lesson written down in the docs: a new event must also be added to the GTM trigger, or it silently never reaches GA4. I now grep the code for every tracked call before publishing a container.
2. A seed finder with its own analytics
The “find your seed” quiz guides visitors to varieties by the effects they want. Its funnel — start, each step, completion, results — goes to GA4 as events. Only finished quizzes become a row in a spreadsheet (answers, how many varieties matched, which ranked first), which is what I read when deciding what to stock. Nothing that identifies a person is stored, and purchases carry a flag that answers directly: does the finder sell?
3. Technical SEO from Search Console
Search Console showed roughly 118 URLs “indexed, though blocked by robots.txt”, thousands of URLs returning server errors, and invalid product snippets. I wrote the diagnosis and a prioritised plan with measurable targets for each problem.
- →The approach, a hybrid rule: combinations that explode into thousands of useless URLs return 410 Gone; legitimate filters stay crawlable with noindex,follow and a canonical to the clean category.
- →robots.txt and the middleware aligned so no URL lives in limbo.
- →Schema.org markup: Product with Offer, ItemList for categories and brands, BreadcrumbList, Organization and WebSite.
- →Descriptive content and metadata for category and brand pages, plus a follow-up plan to monitor recovery in Search Console.
4. Speed and caching
The home page used to render on the server for every visit because it read query parameters. I moved that logic into middleware so the page is static, and invalidate content on demand: a WordPress webhook revalidates tags the moment a product, price or stock level changes, and time-based windows are only a safety net.
One gotcha worth recording: Next's data cache only caches GET requests, and WPGraphQL is queried with POST, so fetch caching options were silently ignored. The fix was to wrap those calls in a function-level cache keyed by query and variables.
5. An admin built for one person
A private admin lets me run the store without a developer: orders, sales reports, product costs and profitability, the hero slide editor, promotional slides, theme and seasonal settings, and the blog.
The Hot Sale engine is an example of how these pieces fit: I choose the brands and discount steps, publish the slide, and each product gets a stable discount from a deterministic hash so it never changes during the event. The discount appears on cards and in the cart, MercadoPago charges the reduced price, and everything switches itself off when the event window ends.
What this shows
Owning a real store means the analytics, SEO and performance work has consequences. It is the same method I now offer to other shops through Skala Ecommerce.