One snippet, every platform
Paste the embed code before </body>. The widget facade is 4.7 KB gzipped and lazy-loads on visitor intent.
Choose your stack
Replace YOUR_PROPERTY_ID with the UUID from Settings → Websites in your Pengo dashboard.
Paste this snippet before the closing </body> tag on every page.
<!-- Pengo Widget -->
<script>
(function() {
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var script = document.createElement('script');
script.async = true;
script.src = 'https://app.pengo.chat/embed.js';
var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
})();
</script> Install the plugin "Insert Headers and Footers" (or edit your theme functions.php), then paste this into the Footer Scripts section.
<!-- Pengo Widget -->
<script>
(function() {
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var script = document.createElement('script');
script.async = true;
script.src = 'https://app.pengo.chat/embed.js';
var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
})();
</script> In Shopify admin, go to Online Store, Themes, Edit code, theme.liquid. Paste before </body>.
<!-- Pengo Widget -->
<script>
(function() {
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var script = document.createElement('script');
script.async = true;
script.src = 'https://app.pengo.chat/embed.js';
var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
})();
</script> In Webflow Designer, open Project Settings, Custom Code, Footer Code. Paste the snippet there.
<!-- Pengo Widget -->
<script>
(function() {
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var script = document.createElement('script');
script.async = true;
script.src = 'https://app.pengo.chat/embed.js';
var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
})();
</script> Add the script to app/layout.tsx using the Next.js Script component with strategy="afterInteractive".
import Script from 'next/script';
// In your layout.tsx <body>:
<Script id="pengo-chat" strategy="afterInteractive">
{`
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var s = document.createElement('script');
s.async = true;
s.src = 'https://app.pengo.chat/embed.js';
document.head.appendChild(s);
`}
</Script> In GTM, create a new Custom HTML tag. Paste the snippet below, set the trigger to All Pages, and publish.
<!-- Pengo Widget -->
<script>
(function() {
window.pengo = window.pengo || {};
window.pengo.propertyId = 'YOUR_PROPERTY_ID';
window.pengo.q = window.pengo.q || [];
var script = document.createElement('script');
script.async = true;
script.src = 'https://app.pengo.chat/embed.js';
var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
})();
</script> Confirm the bubble appears
Load any page with the snippet. You should see the chat bubble in the corner within a few seconds. Use onboarding in the dashboard to send a test message.
- Copy the snippet for your platform and paste it site-wide.
- Swap
YOUR_PROPERTY_IDfor your property UUID. - Hard-refresh the page (or clear cache) and look for the bubble.
- In Pengo, open Settings → Websites and run the install verification check.
Need a hand? We respond in the live widget on this site.
7-day free trial · Card required · Cancel anytime