A U.S. med spa invested in Google, Instagram and local SEO, but its booking system lived on another domain and broke all measurement. We built a WordPress plugin that reproduces the entire booking flow on its site and saves each appointment with its source.
The client
A med spa in the United States that invests consistently in Google search campaigns, Instagram and local SEO to fill its schedule. Its website runs on WordPress; its bookings run on a specialized platform for the industry. For confidentiality, we don't publish its name or domain.
The problem
The business had a critical measurement problem. When the visitor clicked "Book," they left the clinic's site for the booking platform's domain. That redirect broke the attribution chain: campaign parameters were lost and Google Analytics recorded conversions with no source. The result was that there was no way to know which marketing channel was actually producing appointments, and budget was allocated by gut feel, not evidence.
The sentence that summed up the diagnosis: they weren't losing bookings; they were losing the evidence of what produced them.
What we built
We designed a custom WordPress plugin that rebuilds the booking platform's full ten-step flow inside the site itself (services, provider, calendar, time slots, details and confirmation) and uses its API only as a data source. The customer never leaves the domain, so attribution is preserved end to end.
The main components were a React booking widget, a WordPress middle layer that talks to the platform's GraphQL API, a 30-day first-party cookie to capture the source even if the booking happens days later, an appointment database with full attribution, a webhook handler with auditing and retries, email notifications and an admin dashboard for credentials, branding, templates and export.
Security by design: API credentials are stored encrypted and only on the server; tokens are signed server-side and no secret ever reaches the browser; there are no third-party redirects and sensitive fields are excluded from logs.
- React booking widget. A 10-step flow (services, provider, calendar, time slots, details and confirmation) integrated with the site's design.
- Secure API layer. A dedicated WordPress endpoint talks to the booking system's GraphQL API; credentials are stored encrypted on the server and never reach the browser.
- Source capture with a 30-day cookie. Campaign parameters are saved at first landing and travel with the booking even if the customer returns days later.
- Booking database. Each appointment is saved with source, service and value, with CSV export.
- Webhooks with retries and auditing. Events from the booking platform are processed with logging and automatic retry.
- Notifications. Emails to the business and the customer, with editable templates.
- Admin dashboard. Credentials, branding, templates and lead export from WordPress.
What was measured
100% of bookings are recorded with their source channel, the booking journey happens entirely on the client's domain, and the business has its own database with every appointment, its service, its value and the campaign that generated it, exportable to CSV. With that, investment decisions on Google and Instagram are now made with data in a market as competitive as aesthetics.
| Before | After | |
|---|---|---|
| Source of each booking | Lost on leaving the site | Recorded for 100% of appointments |
| Booking experience | Redirect to another domain | Full flow inside the site |
| Customer and appointment data | On the external platform | Also in the business's own database, exportable |
What you can apply in your business
They weren't losing bookings: they were losing the evidence of what produced them
Without attribution, every ad dollar is a bet. The measurement problem was really an investment-decision problem.
When the platform forces you off your site, the answer can be to bring the platform onto your site
Using the API as a data source and building the experience in-house gave the business back control of its measurement and its data.
Security is designed in from the start
Server-side credentials, signed tokens and zero sensitive data in logs: what makes a custom integration reliable over the long term.





