Install Website Chat on WooCommerce
Use the WordPress footer to show Website Chat on WooCommerce storefront pages.
View the stepsWhere the code goes
Example using a child theme; if your site already has a site-wide Custom Code field, you can use that instead.
- Child theme
- functions.php
- wp_footer
- Deploy
functions.php · wp_footer
add_action('wp_footer', function () {
?>
<script async
src="YOUR_STUDIO_WIDGET_SCRIPT_URL"
data-token="YOUR_CHANNEL_TOKEN"
data-server="YOUR_STUDIO_SERVER_URL"
></script>
<?php
});Follow each step.
Every step uses your channel’s real Website Chat snippet; the example on the overview page is not deployable.
-
Publish the Website Chat channel in TrolyPage and copy its channel-specific installation snippet.
-
Back up the site, open the active child theme’s functions.php, and add a wp_footer callback as illustrated. If your theme/host provides a site-wide Custom Code field, you can use its Footer/Body end location instead.
-
Paste the complete channel snippet into the callback or Custom Code field, then deploy. Install it only once; do not add a second copy to product or cart templates.
-
Open a public product and cart page to check the widget, then select Check again in TrolyPage Studio.
Ask ChatGPT or Claude to install it
Works even if your website is not listed. Replace the placeholder with your Studio snippet, adjust the prompt if needed, then send it to an AI assistant with website access.
The button only copies; it does not send data. Without website access, the assistant should guide you. Never share admin passwords or API keys.
You can edit the text before copying.
Verify the installation
Open a public page with the snippet. Once the widget loads, return to your channel’s Install section in Studio and select Check again. Detection requires a signal from the live website.
Check in StudioIf the widget is missing
- This installs the chat widget; it does not automatically sync orders or cart contents with TrolyPage.
- Confirm the channel is Published and your website domain is allowed.
- Check that the snippet appears only once and is not blocked by cache, CSP, or script blockers.
- Open a public page in a private window, then select Check again; builder previews do not replace a live page.
Platform UI steps were checked against official documentation. This is a code-installation method, not a native TrolyPage plugin or app for that platform.
Read WooCommerce documentation