Skip to content
One line of code · Zero dependencies · 2 minutes

Integrate PeekDesk with Your Website

Add co-browsing to your website in 2 minutes — no dependencies. One <script> tag and you're done.

Add Your Domain in the Dashboard

Log in to the PeekDesk dashboard and add your domain in the Domains tab. The domain is verified automatically — no API key is needed in the code.

peekdesk.com/dashboard
Overview
API Key
Domains
Settings
Your Domains
mywebsite.com
Add
Add the domain where you want to use the widget

Choose Your Platform

Click the tab matching your platform to see step-by-step instructions.

1

Open your HTML file

Find the HTML file of your page (e.g. index.html) in any code editor. Search for the closing </body> tag.

2

Paste the widget code before </body>

Copy the snippet below and paste it just before the closing </body> tag:

<script async src="https://peekdesk.com/w.js"></script>

The domain is verified automatically based on your dashboard settings. No API key needed.

3

Save and verify

After saving the file, refresh the page. A green "Live Help" button should appear in the bottom right corner.

Done!

Full HTML file example:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Website</title>
</head>
<body>
  <h1>Welcome to our website</h1>

  <script async src="https://peekdesk.com/w.js"></script>
</body>
</html>
1

Go to the Theme Editor

In the WordPress dashboard, go to AppearanceTheme Editor → select the footer.php file (or Footer).

WordPress Admin
Dashboard
Posts
Pages
Appearance → Theme Editor
Plugins
Theme files: footer.php
Paste code just before </body>
2

Paste the widget code

Find the closing </body> tag in footer.php and paste before it:

<script async src="https://peekdesk.com/w.js"></script>
3

Save the file and check the site

Click Update File, then visit your site. A green button should appear in the corner.

Done!
Alternative: WPCode Plugin

If you don't want to edit theme files, you can use the free WPCode (Insert Headers and Footers) plugin:

1. Install the WPCode plugin from the WordPress repository
2. Go to Code SnippetsHeader & Footer
3. Paste the widget code in the Footer section
4. Save changes

1

Open the theme code editor

In the Shopify admin, go to Online StoreThemes → click ActionsEdit code.

Shopify Admin
Home
Orders
Products
Online Store → Themes → Edit code
2

Find the theme.liquid file

In the file panel on the left, find and click Layouttheme.liquid.

3

Paste code before </body>

Scroll to the bottom of the theme.liquid file, find </body> and paste before it:

<script async src="https://peekdesk.com/w.js"></script>

Click Save in the top right corner.

Done!
1

Go to Custom Code settings

In the Wix dashboard, go to SettingsCustom Code.

Wix Dashboard
Home
Site & Apps
Settings → Custom Code
2

Add a new code snippet

Click the "+ Add Custom Code" button in the top right corner.

3

Paste the code and set position

Paste the code below into the text field. In the "Place Code in" section, select: Body — end. Click Apply.

<script async src="https://peekdesk.com/w.js"></script>
Add custom code
Paste your code here:
Code placement:
Head
Body — start
Body — end
Done!
1

Open the GTM container

Log in to Google Tag Manager and select your container.

2

Create a new Custom HTML tag

Click TagsNew. Select Custom HTML as the tag type.

Google Tag Manager
Overview
Tags
Triggers
Variables
Tag Configuration
Tag type: Custom HTML
3

Paste the widget code

Paste in the HTML field:

<script async src="https://peekdesk.com/w.js"></script>
4

Add a trigger

In the Triggering section, select All Pages so the widget appears on every page.

Trigger Rule
All Pages — Page View
5

Save and publish

Click Save, then Submit (button in the top right corner) to make the changes live.

Done!
1

Open the template editor

In the PrestaShop panel, go to DesignTheme. Find and edit the footer.tpl file (path: themes/your-theme/templates/_partials/footer.tpl).

PrestaShop Back Office
Orders
Catalog
Customers
Design → Theme → footer.tpl
2

Add the widget code

At the end of the footer.tpl file (before closing tags), paste:

<script async src="https://peekdesk.com/w.js"></script>
3

Save and clear cache

Save the file, then go to AdvancedPerformance and click Clear cache to make the changes visible.

Done!
1

Create a hook or component

In SPA applications (React, Next.js, Vue, Angular), the widget should be loaded dynamically. Here's an example for React using the useEffect hook:

// components/PeekDeskWidget.jsx
import { useEffect } from 'react';

export default function PeekDeskWidget() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://peekdesk.com/w.js';
    script.async = true;
    document.body.appendChild(script);

    return () => {
      // Cleanup on unmount
      document.body.removeChild(script);
      const widget = document.getElementById('peekdesk-widget');
      if (widget) widget.remove();
    };
  }, []);

  return null;
}
2

Use the component in your app

Add the component to your main layout (e.g. App.jsx or layout.tsx):

// App.jsx or layout.tsx
import PeekDeskWidget from './components/PeekDeskWidget';

function App() {
  return (
    <>
      {/* rest of your application */}
      <PeekDeskWidget />
    </>
  );
}
3

Done — no additional configuration needed

PeekDesk widget automatically handles URL changes in SPA applications (listens to popstate and DOM mutations), so no additional configuration is needed.

Done!
Next.js — alternative with Script

In Next.js, you can use the <Script> component instead of useEffect:

// app/layout.tsx
import Script from 'next/script';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <Script
          src="https://peekdesk.com/w.js"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

After Installation

Verification

After adding the code, refresh the page. If the widget works correctly, you'll see a green "Live Help" button in the corner of the page. Click it to test the connection.

Customization

All widget settings (button text, position, color, icon, language, theme) are configured in the Dashboard → API Key. The snippet is minimal and requires no data attributes.

Domain Authorization

Remember to add your website domain in the PeekDesk dashboard (Dashboard → Domains). The widget will only work on authorized domains.

Need Help?

If you have trouble with integration, email us at hello@peekdesk.com — we respond within 24 hours.

Don't have an account yet?

Create a free account and add co-browsing to your website in minutes.

Create Account — Free