Wordpress

How to quickly integrate Compai Webchat into Wordpress

960

Wordpress is a popular platform for hosting blogs and other CMS driven websites. To add Comapi's Webchat widget to your Wordpress site is simple. You have two choices:

  1. Use Comapi's Webchat Wordpress plugin
  2. Add the Javascript to your site yourself using Scripts n Styles plugin

Either approach is quite simple but the Comapi Webchat Wordpress plugin is the simplest.

Using the Comapi Webchat Wordpress Plugin

To install the Comapi Webchat widget into your Wordpress site follow these simple steps:

  • Login to your Wordpress admin console
  • Click on the Plugins options in the left hand menu
  • Add the Comapi Webchat Plugin by clicking the Add New button and then subsequently search for Comapi
  • Select the Comapi Webchat Plugin from the list of plugins and click Install Now
  • Once installed ensure it is activated by clicking the Activate link in the plugins entry in the Plugins page in Wordpress
  • Now we will configure the plugin to deliver the Comapi Web Chat Widget for all pages in your Wordpress site
  • Pick the Settings menu option from the left hand menu in Wordpress, now click the Comapi Webchat Settings sub menu item as shown below:
1279

Comapi Webchat Plugin Settings

  • In the API Space field copy in the API Space id GUID which can be found in the Comapi portal in the Hub -> API Space Details menu option.
  • Now click Save Settings and go to your site to test, if the Comapi Webchat Widget doesn't show in the bottom right corner, double check you have followed the steps above correctly and ensure you have added a team with the Webchat channel enabled in your Teams tab in the Comapi Chat tool, found in the Comapi Portal under Contact > Chat > Teams e.g.
1904

Enabling a chat team for Webchat

πŸ‘

All done

Your Comapi Webchat widget will be avialable in your Wordpress site. You can read more about integrating the Webchat widget and linking it to your own security here.

1261

Comapi's Webchat widget running in a Wordpress site

Integrating using JavaScript

As a default Wordpress does not allow JavaScript to be included in your pages, but it can be easily achieved using free and widely used Wordpress plugins such as Scripts n Styles.

Follow these simple steps to embed Comapi's Webchat widget in just a few minutes:

  • Login to your Wordpress admin console
  • Click on the Plugins options in the left hand menu
  • If you don't already have the Scripts n Styles plugin listed then add by clicking the Add New button and searching for it with Scripts n Styles
  • Once installed ensure it is activated by clicking the Activate link in the plugins entry in the Plugins page in Wordpress
  • Now we will configure the plugin to deliver the Comapi Web Chat Widget for all pages in your Wordpress site
  • Pick the Tools menu option from the left hand menu in Wordpress, now click the Scripts n Styles sub menu item
  • Scroll down until you find the Scripts (end of the body tag) section
  • In a new web browser tab login to the Comapi Portal
  • Now open the menu item Channels > Web Chat
  • Select the Code button in the Web chat section, and copy the Javascript code from between the tags e.g.
909

Copying the Javascript Webchat widget code

  • Now switch back into your Wordpress admin web browser tab and paste the copied Javascript into the Scripts (end of the body tag) section we found earlier. e.g.
1279

Configuring Scripts n Styles

  • Now click Save Settings and go to your site to test, if the Comapi Webchat Widget doesn't show in the bottom right corner, double check you have followed the steps above correctly and ensure you have added a team with the Webchat channel enabled in your Teams tab in the Comapi Chat tool, found in the Comapi Portal under Contact > Chat > Teams e.g.
1904

Enabling a chat team for Webchat

πŸ‘

All done

Your Comapi Webchat widget will be avialable in your Wordpress site. You can read more about integrating the Webchat widget and linking it to your own security here.

1261

Comapi's Webchat widget running in a Wordpress site

πŸ“˜

Enhance the plugin

Our plugin is open source, so if you want to contribute check it out at https://github.com/comapi/comapi-wordpress-plugin