How to Add Asyntai AI Chatbot to TYPO3
Step-by-step guide for TYPO3 websites
Step 1: Get Your Embed Code
First, go to your Asyntai Dashboard and scroll down to the "Embed Code" section. Copy your unique embed code which will look like this:
<script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script>
Note: The code above is just an example. You must copy your own unique embed code from your Dashboard as it contains your personal widget ID.
Step 2: Using TypoScript footerData (Recommended)
The easiest way to add the chatbot to all pages is using TypoScript footerData:
- Log in to your TYPO3 Backend
- Go to Web → Template
- Select your root page in the page tree
- Click on "Edit the whole template record" (or select "Info/Modify" and then "Setup")
- In the Setup field, add the following TypoScript code:
page.footerData.99 = TEXT
page.footerData.99.value = <script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script> - Replace
YOUR_WIDGET_IDwith your actual widget ID from the dashboard - Click "Save"
- Clear the TYPO3 cache: Admin Tools → Maintenance → Flush TYPO3 and PHP Cache
Tip: Using footerData places the script just before the closing </body> tag, which is recommended for chat widgets as it won't slow down your page loading.
Alternative: Using Site Package (For Site Packages)
If you're using a site package, you can add the script via your TypoScript configuration file:
- Navigate to your site package folder:
packages/your_sitepackage/Configuration/TypoScript/ - Open or create setup.typoscript
- Add the following code:
page.footerData {
99 = TEXT
99.value = <script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script>
} - Replace
YOUR_WIDGET_IDwith your actual widget ID - Clear the cache in TYPO3 backend
Alternative: Using Fluid Template (FooterAssets)
For sites using Fluid templates, you can use the FooterAssets section:
- Navigate to your Fluid template file (usually in
Resources/Private/Templates/) - Add a FooterAssets section in your layout or template:
<f:section name="FooterAssets">
<script async src="https://asyntai.com/static/js/chat-widget.js" data-asyntai-id="YOUR_WIDGET_ID"></script>
</f:section> - Make sure your page layout renders the FooterAssets section:
<f:render section="FooterAssets" optional="true" /> - Clear the TYPO3 cache
Important: The FooterAssets feature requires TYPO3 v8 or later. For older versions, use the TypoScript footerData method.
Alternative: Using AssetCollector (For Developers)
For extension developers, TYPO3 v10.3+ offers the AssetCollector API:
- In your PHP code (e.g., a controller or middleware), inject the AssetCollector
- Add the script with custom attributes:
use TYPO3\CMS\Core\Page\AssetCollector;
$this->assetCollector->addJavaScript(
'asyntai_chatbot',
'https://asyntai.com/static/js/chat-widget.js',
['async' => 'async', 'data-asyntai-id' => 'YOUR_WIDGET_ID']
);
Step 3: Verify Installation
After saving your changes and clearing the cache, visit your website in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner. Click it to make sure it opens and works correctly.
Not seeing the widget? Make sure to clear all caches: go to Admin Tools → Maintenance → Flush TYPO3 and PHP Cache. Also try clearing your browser cache or viewing in an incognito window. If using TypoScript, verify that your template is properly included in the page hierarchy.