If your site is built with a custom framework or hand-coded HTML, adding Lark is a single script tag. It works with any stack.
Before you start
- Your Lark agent is live and your organisation domain is saved in Organisation settings.
- You have access to edit your site’s HTML or template files.
Get your embed script
In your Lark dashboard open Add to site and copy the floating button script.
Paste the script before the closing </body> tag in your base layout or template file. This adds the agent to every page.
Inline embed
To render the agent inside a specific element on a page, add a container div and use the inline embed code:
With the floating script on the page, any element with the data-estimator-open attribute opens the agent. Add data-launcher="false" to the script tag to hide the default button.
You can also trigger it from JavaScript:
Your website’s domain must match the domain saved in Organisation Settings in Lark before the agent will load. Go to Organisation Settings, check the domain field, and make sure it matches your live site. The agent will not appear on localhost or staging URLs unless those domains are added separately.