Install guide · WordPress
Add the Quackback widget to WordPress
Paste one snippet into your WordPress site and the launcher appears on every page. Use a header and footer plugin if you don't edit theme files, or a child theme if you do. WordPress can also sign identify tokens for logged-in users.
Get your widget snippet
- 14-day Pro trial, no card needed
- Your workspace URL and snippet, ready to copy
- The widget is on every plan, including Free
The widget your customers see inside your app.
Install the widget in WordPress
First, in Quackback, open Settings, then Widget, and turn on Show on your website. Until it's on, the snippet loads but the launcher stays hidden. Every snippet uses your-workspace.quackback.io as a placeholder. Swap in your workspace URL, or your custom domain, from Settings, under Widget, then Install.
Copy your snippet
In Quackback, open Settings, then Widget, then Install. The snippet there has your workspace URL filled in. It looks like this.
<script>
(function(w,d){if(w.Quackback)return;w.Quackback=function(){
(w.Quackback.q=w.Quackback.q||[]).push(arguments)};
var s=d.createElement("script");s.async=true;
s.src="https://your-workspace.quackback.io/api/widget/sdk.js";
d.head.appendChild(s)})(window,document);
Quackback("init");
</script>Paste it with a plugin
With WPCode, go to Code Snippets, then Header & Footer, and paste the snippet into the Footer box. Save. Any plugin that adds code before </body> works the same way.
Or add it to your child theme
If you maintain a child theme, print the snippet from the wp_footer hook. Edit a child theme, not the parent, so theme updates don't remove it.
add_action('wp_footer', function () { ?>
<script>
(function(w,d){if(w.Quackback)return;w.Quackback=function(){
(w.Quackback.q=w.Quackback.q||[]).push(arguments)};
var s=d.createElement("script");s.async=true;
s.src="https://your-workspace.quackback.io/api/widget/sdk.js";
d.head.appendChild(s)})(window,document);
Quackback("init");
</script>
<?php });Identify signed-in users
WordPress knows who's logged in, so it can sign the token itself. PHP signs a five-minute HS256 token and passes it to init, and logged-out visitors stay anonymous.
How identify worksStore the signing secret
Copy the signing secret from Settings, under Widget, then Install. Define it in wp-config.php, which never reaches the browser.
define('QUACKBACK_WIDGET_SECRET', 'paste-your-signing-secret');Sign a token for logged-in users
This replaces the snippet from the step above. It signs a token only when someone is logged in and passes it to init as identity.
function quackback_sso_token() {
$user = wp_get_current_user();
if (!$user->exists()) return null;
$b64 = fn($data) => rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
$header = $b64(wp_json_encode(['alg' => 'HS256', 'typ' => 'JWT']));
$payload = $b64(wp_json_encode([
'sub' => (string) $user->ID,
'email' => $user->user_email,
'name' => $user->display_name,
'exp' => time() + 300,
]));
$signature = $b64(hash_hmac('sha256', "$header.$payload", QUACKBACK_WIDGET_SECRET, true));
return "$header.$payload.$signature";
}
add_action('wp_footer', function () {
$token = quackback_sso_token();
$options = $token ? ['identity' => ['ssoToken' => $token]] : new stdClass();
?>
<script>
(function(w,d){if(w.Quackback)return;w.Quackback=function(){
(w.Quackback.q=w.Quackback.q||[]).push(arguments)};
var s=d.createElement("script");s.async=true;
s.src="https://your-workspace.quackback.io/api/widget/sdk.js";
d.head.appendChild(s)})(window,document);
Quackback("init", <?php echo wp_json_encode($options); ?>);
</script>
<?php });Good to know on WordPress
Widget events and methodsCommon questions
Is there a Quackback WordPress plugin?
Not yet. The snippet works with any plugin that adds code to the footer, or with the wp_footer hook in your theme.
Does it work on WordPress.com?
On WordPress.com, adding custom code needs a plan that allows plugins or theme edits. Self-hosted WordPress has no such limit.
Will the widget slow down my site?
The script loads asynchronously, and the panel loads in an iframe when the browser is idle, so it stays off your critical path. Its theme and settings come from your workspace, so changing them needs no redeploy.
Is the Quackback widget free?
Yes. The widget is on every plan, including Free, with feedback, live chat, help articles and your changelog inside it. Every signup starts with a 14-day Pro trial.
Have another question? Talk to the team.