1. Home
  2. Docs
  3. WordPress plugin

Pong Chat plugin for WordPress

The plugin puts the widget on every page of a WordPress site and tells Pong who your logged-in users are. No code: one public key in Settings → Pong Chat.

Install

  1. Download pong-chat.zip.
  2. In WordPress open Plugins → Add New → Upload Plugin, choose the file, then Install Now and Activate.
  3. Open Settings → Pong Chat, paste your public key and save. The widget is on the site.

The public key is in the desk at app.pong.ee under Settings → Chat widget → Install. You can paste the whole widget code instead — the plugin takes the key out of it. No workspace yet? Create one first; it is free for one agent.

Needs WordPress 6.3 or newer and PHP 7.4 or newer. Works with WooCommerce and with page caching plugins.

Settings

SettingWhat it does
Public keyYour workspace. The widget shows as soon as it is saved; empty turns the widget off.
Identity secretOptional. Signs logged-in users so Pong can trust who they are — see below. Once saved it is shown as dots with its last four characters; the bin button removes it or lets you type a new one.
Tell Pong who is writingSends the name, email and user id of a logged-in user. On by default.
Hide the widget from administrators, editors and authorsYour own team does not see the chat button while working on the site.
ButtonLauncher look: 3D ball, round button or tab. “As in the workspace” keeps the desk setting.
PositionBottom right or bottom left.
Button colorA #hex color; empty keeps the color set in the workspace.

Everything else — texts, the welcome message, AI replies — is set in the desk and applies to the WordPress site at once.

Logged-in users

With “Tell Pong who is writing” on, a logged-in user’s name and email appear in the desk next to their chat, so nobody has to ask “what is your email?”.

Add the identity secret to go one step further: the plugin signs each user on your server, and Pong treats them as verified. Their chats from every browser and device become one conversation, and the desk marks them as verified.

  1. In the desk open Settings → API keys and press the regenerate button next to Identity secret. Copy the new secret — it is shown once.
  2. Paste it in Settings → Pong Chat → Identity secret and save.

The secret stays in your WordPress database and never reaches the browser. Regenerating it stops the old one: if another site of yours signs users with it, update that site too.

When a user logs out, the plugin starts a clean chat for the next person on that browser.

WooCommerce

Customers are WordPress users, so a signed-in customer is recognised the same way: the agent sees their name and email, and the chat follows them from the product page to the checkout and to their phone. No extra setup.

For developers

Two filters cover what the settings page does not. pong_chat_setup changes any of the PongSetup options before they are printed:

add_filter( 'pong_chat_setup', function ( $setup ) {
	$setup['language'] = 'en';
	$setup['buttonPosition'] = 'bl';
	return $setup;
} );

pong_chat_userhash changes the id a user is known by (default wp-<user id>) — use it when the same workspace also serves another site with its own user ids:

add_filter( 'pong_chat_userhash', function ( $userhash, $user ) {
	return 'shop-' . $user->ID;
}, 10, 2 );

The JavaScript API works as on any site: Pong(...) calls from your theme run once the widget has loaded.

What the plugin sends

The widget loads from js.pong.ee and talks to Pong from the visitor’s browser: the page address, referrer, browser data and the messages the visitor writes. For logged-in users it adds the name, email and user id when that setting is on. Nothing is sent from your server, and the identity secret is never sent at all. See the privacy policy.

Check it works

  1. Open your site in a private window — the chat button is in the corner.
  2. Send a message; it arrives in the desk within a second.
  3. Log in as a customer and write again: the desk shows the name and email, and a verified mark if the identity secret is set.
No button? Check that the public key is saved, that “Hide the widget from administrators…” is off while you test as an admin, and clear the page cache.

← Install the widgetJavaScript API →