Adding the tawk.to widget to Magento 2
The instructions below are for desktops and laptops only.
Adding the tawk.to live chat widget to your Magento 2 store makes it easy for visitors to reach you while they browse. This guide walks you through removing older versions of the extension (if needed), installing the latest version, enabling it in your Magento admin, and configuring where and how the widget appears. If you prefer not to install an extension, you can also add the widget using Magento’s content editor.
Before you start
These steps apply to Magento 2. Magento 1 (Commerce 1 or Open Source 1) is no longer supported.
You’ll need access to your Magento installation, either through SSH or your hosting control panel, especially if you plan to install the extension via Composer.
If you already installed an older tawk.to extension from an archived repository (such as this), remove it first to avoid conflicts.
Remove an older tawk.to extension (if applicable)
If installed via Composer (standard or artifact):
Install Composer (if you don’t have it)
Composer is required to install the tawk.to extension and its dependencies.
From your Magento root folder, run:
Install the tawk.to Magento 2 extension
Recommended: Install via Composer
This is the simplest way to install and keep the extension updated.
Manual installation (alternative)
If you prefer installing manually:
2. Extract the files and copy them to:
3. Install the required dependency:
Enable the extension and deploy assets
Once installed, activate the module and refresh Magento’s configuration:
These commands ensure Magento recognizes the new extension and loads all required files.
Configure the widget inside Magento
After enabling the extension, set up your widget from the Magento admin:
1. Go to System > tawk.to widget.

2. Under Select Store, choose the store view you want to configure (you can assign different widgets to different store views).

3. Log in to your tawk.to account and select the Property and Widget you want to use. Then, Click Use selected widget.

Visibility options
These settings allow you to show or hide the widget across specific sections of your site.
Use these options to control where the widget appears:
Always Display Widget: The widget appears on every page unless you add exceptions.
Do Not Display Widget: The widget stays hidden, except on the pages you list.

You can use:
Full URLs (starting with http or https)
Paths beginning with /
Wildcards (*)
Multiple entries separated by commas
For example, if you don’t want the widget to appear on your Contact page, copy the path of your page:

And paste it in the exception field:


Privacy options
When Visitor Recognition is enabled, logged-in customer details (name and email) appear automatically for agents in tawk.to. Enable this only if it matches your privacy policy and customer expectations.

Add the widget using Magento’s content editor (alternate option)
If you prefer not to install an extension, you can embed the widget code using a CMS block. This method is flexible but may not support every feature that the extension offers.

3. Click Administration in the top menu.

4. Click Chat Widget under Channels in the left menu.

5. Under Widget Code, click Copy to Clipboard.

Add the widget code to Magento
1. In Magento, go to Content > Blocks > Add New Block.
- Enable the block.
- Add a title and identifier.
- Select your store view.

2. Click HTML Code under Elements.

3. Click the settings icon next to HTML Code in the top menu.

4. Paste the widget code and save the block.

5. Go to Content > Widgets > Add Widget.
6. Choose CMS Static Block under Type and set your Design Theme. Then, click Continue.

7. Enter the Widget Title and choose a store view under Assign to Store Views.

8. Under Layout Updates, choose the pages you want the widget to appear. Select CMS Footer Links under Container. Then, click Add Layout Updates.

If you see a restricted HTML error:
Magento may block certain tags for security reasons. This behavior varies by version and host. If it happens, use the extension method or ask your developer to allow script tags safely.
Additional considerations
Test your widget on multiple devices
Check both desktop and mobile views to make sure the widget displays correctly and loads quickly.Double-check your property and widget selection
If you manage several properties, make sure you connect the correct one to each store view.Refreshing Magento caches helps
If changes don’t appear immediately, clear caches and redeploy static content.Limited access?
If you don’t have SSH or CLI access, the content-editor method may be easier, though it offers fewer configuration options.Visitor data
If you turn on Visitor Recognition, ensure your privacy policy explains how customer data is used.
Related guides
Changing the appearance of the tawk.to chat widget
Change how the widget behaves on your site
How to modify your widget content
Advanced features category - learn about your widget’s advanced features
AI Assist category - explore automation and AI toolsIf you have feedback about this article, or if you need more help:
Click the green live chat icon.
Schedule a call with us.
Visit our community.
