A standalone, zero-dependency marketing budget simulator for a boutique European marketing agency. It captures visitor intent through a GDPR-compliant lead gate and models Meta & Google advertising performance by combining industry benchmarks with real campaign historical data. Every submission is piped to an n8n automation engine that updates a Google Sheets cockpit and instantly fires email alerts to the sales team.

The challenge
The agency wanted an interactive lead magnet on their Wix-hosted site where prospective clients could model advertising returns in their specific sector (Hospitality, Construction, B2B, etc.). The challenge was three-fold: the widget had to be lightweight and single-file to bypass Wix's strict iframe limits, it had to model multi-stage marketing funnels (Meta Ads and Google Search clicks) using actual historical data from 50+ managed client campaigns, and it needed to capture and route lead events instantly to the sales team without risking data loss or exposing backend operational logic.
The solution
I built the widget as a self-contained, single-file HTML/CSS/JS application with zero dependencies to ensure 100+ Lighthouse scores and instant loading within Wix Classic embeds. Instead of direct API access on Wix or exposing sensitive tokens, the widget communicates with a self-hosted n8n webhook. When a user submits the GDPR-compliant lead form, n8n writes the data to a Google Sheets database, handles duplicate events via UUIDs, and triggers an email notification to the sales team only when the user requests a follow-up. An 'internal mode' (via URL parameters) allows agency representatives to skip the gate for live pitches.
The User Journey
Visitor selects one of 4 marketing goals (Awareness, Traffic, Leads, Recruitment) and one of 15 sectors.
Visitor sets a monthly budget and drags a single slider to adjust the Meta / Google Ads split.
Visitor fills in contact details. n8n stores the lead in Google Sheets and tags the event as lead_aangemaakt.
Widget renders expected reach, clicks, CPL, and monthly leads growth on a dynamic chart.
Visitor can request a follow-up meeting. If clicked, n8n flags the lead in Google Sheets and instantly alerts the sales team by email.
What it does
Technical stack
How it fits together
Lightweight frontend widget connected to n8n for database storage and instant notifications. Here is the data flow.
Who this fits for
Screens
Questions & comments
Interested, or want to ask how something works? Leave a public comment.
Comments are public. Links are shown as plain text, not clickable.
Loading comments…