To have chat widget which is recommended way

I have given task to create chatbot to reduce workload i planned to use web widget provided by rasa but people are using different ways of creating widget: which way is recommended. explain to me?

Way 1: Using tag in html

</rasa-chatbot-widget>

i have installed the necessay packages inside my localdirectory i have’nt used any external js links i donwloaded and kept inside my working directory. like this :

Way 2: Using script tag to create the widget

like webChat.init() kind of things in script tag of html file.

I prefer the script-based approach; gives you the control and flexibility needed to create a production-ready chatbot integration that can scale with your needs. Plus it’s modern and more easy to integrate with modern websites.