October 31, 2026

How to Add Live Chat to Shopware: Theme, Plugin and Consent

Add live chat to Shopware: a Twig template override placing the Talkmio chat snippet before the closing body tag

To add live chat to Shopware, you paste the Talkmio install snippet into a Twig template override that renders just before the closing </body> tag of every storefront page. In Shopware 6 the clean place for this is the base_body_script block of the base template, added through a small plugin or your theme, with the site key read from configuration and the snippet allowed by your cookie consent setup. This guide explains the options, shows the template override, covers consent and staging and lists the checks that confirm the chat works for every visitor. It assumes a Shopware 6 shop and basic familiarity with plugins or themes.

Talkmio is an AI live chat. Its assistant, Mio, reads your shop pages and the documents you upload, answers visitors in their own language and hands the conversation to your team when it cannot answer from your content, when the visitor asks for a person, complains or asks about a specific order. Those are the questions a shop receives all day.

Choose How to Add Live Chat to Shopware

Shopware does not have a paste-a-script field in the administration by default, so you have three routes. The right one depends on who maintains the shop.

Route How Best for
Small plugin A plugin that extends the base template and reads the site key from plugin configuration Agencies and shops with a developer
Theme override Add the snippet in your custom theme’s base template override Shops that already maintain a custom theme
Google Tag Manager Import the Talkmio container and publish it through your tag manager Marketing teams that manage scripts without deployments

For most shops with a developer, the small plugin is the cleanest, because it survives theme changes and can be switched on and off with the plugin itself. If you already load Google Tag Manager, Talkmio offers a container import that avoids code changes. Our guide to live chat with Google Tag Manager explains that route.

What You Need Before You Start

You need a Shopware 6 shop with access to its code or a developer who has it, a free account at app.talkmio.com and a site key. In Talkmio, open Websites, choose Add and enter your shop domain. Talkmio then shows the site key and the install snippet. This guide uses a placeholder instead of printing the snippet, so you always paste the current version from your own account.

Test on a staging copy first. A change to a base template affects every storefront page, and it is easier to find a typo on staging than on a live checkout. The Shopware theme documentation describes how template extension works in the storefront.

The Template Override

Shopware’s storefront base template, storefront/base.html.twig, defines a block named base_body_script immediately before the closing body tag. Your plugin or theme extends that template and adds the snippet inside the block. The file lives at src/Resources/views/storefront/base.html.twig in your plugin:

{% sw_extends '@Storefront/storefront/base.html.twig' %}

{% block base_body_script %}
    {{ parent() }}
    {# Paste the Talkmio snippet from Websites here #}
{% endblock %}

Calling parent() keeps whatever other plugins add to the block, which is important in shops with several extensions. Clear the cache, reload a storefront page and the chat bubble should appear in the corner. If it does not, the override is not being picked up: check that the plugin is installed and active, that the template path matches the plugin’s structure and that the theme compiles after the change.

Keep the Site Key in Plugin Configuration

Hard-coding the site key in a template works, but it ties the code to one shop. A better pattern is to add a text field to the plugin’s configuration and read it in the template with Shopware’s config() function, using the plugin name, the word config and the field name. Then merchants can change the key in the administration, and a staging shop can use its own Talkmio website entry with a different key.

A site key is meant to appear in the page source, because the browser needs it, so this is about convenience and per-shop values, not secrecy. Never put an account password or API token in a template or a public setting. Wrap the snippet in a condition that checks the key is not empty, so that a shop without a key shows no widget and no errors.

Cookie Consent and the Storefront

Shopware shops in the EU usually run a cookie consent manager, and a chat widget loads a script from a third party and may set storage in the browser. Decide how you want that handled. Many shops treat a support chat as a functional feature, others ask for consent first. Whichever choice you make, make it deliberately, document it in your privacy notice and test it with the consent banner closed, accepted and rejected. Our article on chat widget cookies and consent explains the choices.

Data in Talkmio is stored on servers in the EU, in Germany, and only the conversation text and relevant knowledge base excerpts are sent to the AI model provider. You can export or delete data at any time by writing to [email protected]. If you use a content security policy, allow the host the snippet loads its script from, which you can read from the snippet itself, and test in report-only mode first.

Checkout, Mobile and Performance

Decide where the chat should appear. For most shops, product pages, cart and contact pages are where visitors have questions, while the final payment step needs a calm screen. Check that the bubble does not cover the buy button or the cookie banner on a small phone, and confirm that it does not hide fields in the checkout form. You can set the widget colour, position, assistant name and welcome and offline texts in Talkmio under Websites, and the changes apply within five minutes without touching the shop code.

The widget script loads asynchronously, but test your page speed before and after, in the same way you would for any third-party tool. Our guide to the live chat widget page speed impact explains what to measure. If you run a multilingual shop with several sales channels or domains, create a separate Talkmio website entry for each domain so that statistics and conversations stay clean.

Teach Mio Your Shop Before You Announce It

With the widget visible, spend your time on the knowledge. In Talkmio, open Mio AI and then Knowledge base, add your shop and Mio reads every public page on the same domain while respecting robots.txt. Add the documents that do not live on a page, such as size guides, delivery tables or warranty terms. Talkmio accepts PDF, DOCX, TXT, MD, CSV and HTML files up to 15 MB. Then write business instructions that state what Mio must not promise, for example never to quote a delivery date for a specific order, and use Try Mio to test answers and see which knowledge pieces were used.

Orders deserve special care. Mio hands the conversation over when a visitor asks about a specific order, so your team can look it up in Shopware. Our guide to live chat for e-commerce stores covers the typical shop questions, and the guides for Magento and PrestaShop show how a similar platform handles the same job, and the PrestaShop guide does the same for another popular shop system.

Updates, Deployments and Maintenance

Shopware shops change often: core updates, plugin updates, theme changes and new sales channels. Treat the chat integration like any other extension. Keep the plugin in version control, document where the site key is configured and add the chat check to your release routine: after each deployment, open the live shop in a private window, confirm that the bubble appears and opens and send a test message that arrives in the Talkmio Inbox.

Template overrides are the part most likely to break after a major update, because the base template can change between versions. If the bubble disappears after an update, check whether the block name or the template path has changed in the new version, and compare with the current storefront template. A staging copy that mirrors production is the cheapest insurance, and it also gives your support team a place to practise before changes reach customers.

When your team changes, make sure somebody owns the chat. The developer owns the plugin and the configuration, while a support lead owns the knowledge, the Inbox and the weekly review of conversations. Talkmio lets you invite operators under Team, with agents handling conversations and admins also managing websites, Mio and settings, so the permissions match the roles. Write both owners’ names in your internal documentation, so a new colleague knows who to ask when something stops working.

One practical tip for agencies: build the plugin once and reuse it across client shops, with the site key as the only setting. A single reviewed, tested plugin is easier to support than a snippet pasted differently into each theme, and it makes onboarding a new shop a ten-minute job instead of a custom task each time.

Troubleshooting a Missing Bubble

When the bubble does not appear, work through four checks in order. Is the plugin active and the template override loaded after clearing the cache? Is the site key set and the condition true? Does the page source in the browser show the script tag just before the closing body? Does the console report a blocked request from a content security policy, a consent manager or an ad blocker? Fixing the first one that fails solves most cases. If all four look right, test in a private window with extensions disabled, because privacy extensions block many chat widgets.

Plans and limits are on the Talkmio pricing page, and the Free plan, with one operator, one website and 50 AI answers a month, is enough to prove that the integration works. For the platform background, see the overview of Shopware.

Frequently Asked Questions

Does Shopware have a field for pasting a chat script?

Not by default in the administration. The usual routes are a small plugin or a theme override that adds the snippet to the base_body_script block, or a Google Tag Manager container if your shop already uses one. Test on staging first.

Where does the snippet go in the Shopware storefront template?

Put it in the base_body_script block of storefront/base.html.twig, which sits just before the closing body tag. Extend the template with sw_extends, call parent() so that other plugins still work, and then paste the Talkmio snippet inside the block, before clearing the cache.

How do I keep the site key out of the template?

Add a text field to your plugin configuration and read it in Twig with the config function. Then merchants can change it in the administration and staging shops can use their own key. Skip rendering when the field is empty.

Does the chat need cookie consent in Shopware?

That depends on your policy and local law. Decide whether to treat support chat as a functional feature or to ask for consent first, document it in your privacy notice and test the widget with the banner accepted, rejected and closed.

Can Mio look up an order in Shopware?

No. Mio answers from your content and hands the chat to your team when a visitor asks about a specific order, so a person can check the order in Shopware. Publish clear delivery and returns pages for everything that does not need a lookup.

Is it free to try on my shop?

Yes. The Free plan includes one operator, one website, 50 AI answers a month and 50 tickets a month, with no card needed. Pro adds three operators, three websites, 1,000 AI answers a month, unlimited tickets and the e-mail channel.

The Bottom Line

You can add live chat to Shopware with one template override in the base_body_script block, a site key in plugin configuration and a deliberate cookie consent decision. Test on staging, check checkout and mobile layouts, and then put your time into teaching Mio from your shop pages and policies. Start free with Talkmio, add the snippet to your storefront and see the bubble on your shop today.


Try Talkmio on your site

Free plan, no card required.

Start free