I’m using a YouCanBookMe booking page embedded on my website. The booking page and phone field are configured for Dutch users.
On the standalone booking page, the phone field correctly shows the Dutch flag and data-country="nl". In the embedded version (script), however, the country is not detected correctly and a different flag appears.
Did something change? Or is this a known limitation of the embed, and is there a supported way to force the phone field’s default country to the Netherlands (nl)?
You’ve stumbled upon a known limitation with how our embedded pages currently handle phone number country codes.
Here is a quick breakdown of why this happens:
Standalone Pages: When you use a standalone booking page, it loads directly from our servers. This allows us to securely detect a user’s phone country code.
Embedded Pages: When the page is embedded on your website, it runs entirely in the user’s browser (client-side). For privacy and security reasons, the embed cannot automatically grab their IP location. Instead, it tries to guess the country based on the user’s browser language settings. Because browser languages can be broad or misconfigured, it often guesses incorrectly and defaults to the US or another region.
To answer your question directly: right now, there isn’t a supported way to force the phone field to default to the Netherlands (nl) within an embed. However, our development team is well aware of this friction and is currently looking into adding a setting that would allow you to lock in a default country code in the future.
The Best Workaround: If having the correct country code load automatically is critical for your Dutch users, the best solution right now is to replace the embedded booking form on your website with a standard button or hyperlink. Linking directly to your standalone YouCanBook.me page will ensure our server-side detection kicks in and the Dutch flag appears perfectly every time.
Thank you for your clear explanation and for taking the time to clarify the difference between the standalone page and the embedded version.
That makes sense, even though it’s a bit unfortunate for our users. I’ll look for another solution for now to provide the best possible experience on my website.
I do hope the option to set a default country for embedded booking pages will be added in the future. I think it would be a valuable feature for many users who primarily serve customers in a single country.