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 your site still uses an older tawk.to module, remove it before installing the current version. This helps avoid duplicate files or configuration issues.

If installed via Composer (standard or artifact):

If installed manually:
If your server uses a global Composer installation, run the same commands with composer instead of php composer.phar.

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:

If you’ve installed Composer globally, replace php composer.phar with composer.

Install the tawk.to Magento 2 extension

Recommended: Install via Composer


This is the simplest way to install and keep the extension updated.

Use composer require tawk/tawk-magento-2 if Composer is installed globally.

Manual installation (alternative)


If you prefer installing manually:


1. Download the latest extension package.

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.

First, get your widget code


1. Log in to your tawk.to account.


2. Select the correct property.

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.

  1. Enable the block.
  2. Add a title and identifier.
  3. 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.

9. Save the widget and check your store to confirm the widget is visible.


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


If you have feedback about this article, or if you need more help:

Was this article helpful?

88 out of 131 liked this article

Still need help? Message Us