Add Sincra to any website (HTML)
To add Sincra to your website, paste two lines of code right before the closing </body> tag of every page. Your code is ready in your Sincra dashboard, with your account ID already filled in. This guide works for any website where you can edit the HTML.
What do I need before I start?
- A Sincra account with an active plan. The assistant answers your visitors only while your plan is active. Before you choose a plan, you can try it in the Simulator of your dashboard.
- Access to the HTML of your website, or someone who can edit it for you.
Step 1: Add your domain to Allowed domains
In your Sincra dashboard, open the Widget page and add your website domain, for example example.com, under Allowed domains. The widget only appears on the domains in that list and on their subdomains, so example.com also covers www.example.com and shop.example.com.
While the list is empty, the dashboard does not show your code.
Step 2: Copy your code
On the same page, find the Installation card and click Copy. Your code looks like this, with your own account ID in it:
<script src="https://sincra.cloud/embed.js" data-tenant-id="YOUR_ACCOUNT_ID" data-turnstile-sitekey="..." data-api-host="https://sincra.cloud" data-mode="web" defer></script>
<sincra-widget></sincra-widget>
Copy it from your dashboard, not from this page. The example above does not work as it is.
Step 3: Paste it right before the closing body tag
Open the HTML of your website and paste the code right before </body> on every page where you want the assistant. If your site uses a shared template or footer file, paste it there once and it reaches every page that uses it.
Paste the code only once per page. If you installed Sincra before, remove the old code first.
Step 4: Publish and check that it works
- Publish your changes. If your site uses a cache or a caching plugin, clear it.
- Open your website in a private browser window, so you see the new version.
- Open the chat and ask a question that your pages answer.
The assistant replies from your content and can show links to the pages it used.
Why doesn't the assistant work on my site?
- Your domain is not in Allowed domains, or it is written differently from the address of your site.
- Your plan is not active yet.
- The page is an old cached copy. Clear your site cache and reload it in a private window.
- The code is not on that page, or it was pasted somewhere other than right before
</body>.
Does my site's Content Security Policy need changes?
Most websites don't have a Content Security Policy, and then there is nothing to change. If yours sends one, it must allow Sincra, or the assistant won't load or won't answer. Add these sources to your policy:
script-src https://sincra.cloud
connect-src https://sincra.cloud https://sincra-prod-app-gr535u4h4q-no.a.run.app
frame-src https://sincra.cloud
style-src 'unsafe-inline'
If your policy doesn't list one of these directives, browsers fall back to default-src (for frame-src, to child-src first if you have it), so add the sources there. If your style-src uses a nonce or a hash, browsers ignore 'unsafe-inline': in that case, write to support@sincra.cloud.
What each line is for: the assistant's script loads from sincra.cloud, it talks to our servers at the two addresses in connect-src, its bot check runs in a small frame from sincra.cloud, and it styles itself with an inline style block. It loads no images, fonts or other scripts on your pages.
What if the code is on the page twice?
Keep one Sincra code on each page. If you paste a new code, remove the old one first: two codes on the same page don't work correctly.
Does it slow down my website?
The script tag has the defer attribute. The browser downloads it without blocking your page and runs it after the page has been parsed, so your content shows first.
Can someone else install it for me?
Yes. Add your domain to Allowed domains yourself, then send the code from your dashboard and a link to this guide to whoever built your website. They only need to paste it.