Before getting started
Go through the Overview to generate your Widget from the CometChat Dashboard.Ensure you have:
- A WordPress site (5.0+)
- PHP 7.2 or higher
- Your App ID, Region, and Auth Key
Quick Steps to Embed CometChat Widget
1
Download the Plugin ZIP
- Download the CometChat plugin from here.
- Save the
cometchat-pro.zip
file to your computer.
2
Install & Activate the Plugin
- In WordPress Admin, navigate to Plugins → Add Plugin.

- Click Upload Plugin, choose
cometchat-pro.zip
, and click Install Now.

- Once installed, click Activate Plugin.

3
CometChat Credentials
To use CometChat UI Kit, you first need to register on the CometChat Dashboard.After registering, create a new app and retrieve your authentication details:
- Navigate to Application, then select the Credentials section.
-
Note down the following keys:
- App ID
- Auth Key
- Region
4
Configure Plugin Settings
- In WordPress Admin, go to CometChat Chat Builder in the sidebar.
- Paste your Widget ID, App ID, Region, and Auth Key.
- (Optional) Set Default User UID to auto-login a specific user.
- Choose Display Mode:
- Embedded (inline on specific pages)
- Docked (floating on every page)
- Click Save Changes.
5
Embed Widget Inline (Embedded Mode)
- Edit any Page/Post, add a Shortcode block, and insert:
- Publish or update the Page/Post.
6
Docked Widget (Floating Mode)
- Edit any Page/Post (or site-wide), add a Shortcode block, and insert:
- Publish or update to see the widget docked on the chosen side.
7
Enable Docked on All Pages
- In CometChat Chat Builder settings, set Display Mode to Docked.
- Save—widget will now float on every public page.
Advanced JavaScript APIs
Once the widget is loaded, interact with it via the globalCometChatApp
object:
Chat and Call Methods
UI Event Listeners
Localization
With language localization, our Chat Widget adapts to the language of a specific country or region. Chat Widget allows you to detect the language of your users based on their browser settings and set the language of the widget accordingly. You can also set the language manually using theCometChatApp.localize
method.
The CometChat App supports localization for multiple languages, allowing you to provide a tailored experience for users across different regions.
You can find the list of supported languages and their corresponding language codes below:
Language | Code |
---|---|
English (United States) | en-US |
English (United Kingdom) | en-GB |
Dutch | nl |
French | fr |
German | de |
Hindi | hi |
Italian | it |
Japanese | ja |
Korean | ko |
Portuguese | pt |
Russian | ru |
Spanish | es |
Turkish | tr |
Chinese | zh |
Chinese (Traditional) | zh-TW |
Malay | ms |
Swedish | sv |
Lithuanian | lt |
Hungarian | hu |
Parameter | Description | Type |
---|---|---|
LANGUAGE_CODE | The language code the texts to be translated into | Required |
Troubleshooting
- Plugin upload fails: Ensure the ZIP is intact and WordPress has write permissions.
- Settings not saving: Temporarily disable caching/minification plugins.
- Shortcode not working: Verify the
[cometchat]
syntax and saved settings. - JavaScript errors: Check browser console for missing
CometChatApp
or invalid parameters.