Back to Blog
Tutorial

How to Embed a Chatbot on Any Website: WordPress, Wix, Shopify & More

Step-by-step guide to adding an AI chatbot to any website platform — from WordPress and Wix to Shopify, Webflow, and custom React apps.

April 15, 20255 min read

One of the most common questions we get is "how do I add the chatbot to my specific website platform?" The good news: it's the same single script tag for every platform. The only difference is where you paste it.

The Universal Script Tag

Every PageCortex chatbot uses one line of code:

<script src="https://www.pagecortex.com/widget.js" data-bot-id="YOUR_BOT_ID" async></script>

Platform-Specific Instructions

WordPress

Go to Appearance → Theme File Editor, open footer.php, and paste the script before . Or use the "Insert Headers and Footers" plugin for a no-code approach.

Wix

Navigate to Settings → Custom Code → Add Custom Code. Set placement to "Body - End" and apply to "All Pages."

Shopify

Go to Online Store → Themes → Edit Code, open theme.liquid, and paste before the closing tag.

Webflow

In Project Settings → Custom Code, paste into the "Footer Code" section and publish.

Squarespace

Go to Settings → Developer Tools → Code Injection and paste in the Footer section.

React / Next.js

Use the Script component:

import Script from 'next/script'
<Script src="https://www.pagecortex.com/widget.js" data-bot-id="YOUR_BOT_ID" strategy="lazyOnload" />

Google Tag Manager

Create a new Custom HTML tag, paste the script, and set the trigger to "All Pages."

Customization

You can customize the widget with data attributes:

`data-color="#6366f1"` — Widget accent color

`data-position="right"` — Widget position (left or right)

The widget automatically matches your site's layout and works on both desktop and mobile.

Ready to convert more visitors?

Start free — no credit card required. Set up in under 5 minutes.

Start free →