Adding script code to Wix

Hi Guys!

I am trying to embed a Booking.com button on my website.

Here is the code I got from Booking.com :

When I try to add this code to the HTML element in the Editor, it doesn’t work.

Could you please tell me what’s wrong?

Thank you so much in advance!

Wix doesn’t work with HTML code, it uses Javascript.

If you want to use HTML code on your page, then you need to use a HTML iFrame.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site

Note that Wix does not provide support for third party code that it hasn’t had the chance to fully test out itself, therefore if you have any issues with it then you need to go back to your third party provider, in this case Booking.com and get help from their own support to integrate it into Wix.

Although to be honest, you are much better and more secure, using their own API and exposing your site to it through Wix Fetch or Wix HTTP Functions.
https://developers.booking.com/api/index.html

https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api

https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions

https://www.wix.com/corvid/forum/wix-tips-and-updates/example-myapi-and-myapiclient

Thanks a lot for your help!