WordPress
You can add PageClerk to WordPress without editing your theme, using a header and footer plugin.
Method 1: Header & footer plugin (recommended)
Section titled “Method 1: Header & footer plugin (recommended)”This method survives theme updates because it does not modify theme files.
-
In the WordPress admin, go to Plugins → Add New.
-
Search for WPCode (or any “Insert Headers and Footers” plugin), then click Install Now and Activate.
-
Open Code Snippets → Header & Footer.
-
Paste your PageClerk snippet into the Footer box:
<script>window.pageclerkConfig = {chatbotId: "YOUR_CHATBOT_ID"};</script><script src="https://pageclerk.com/api/widget.js" defer></script> -
Click Save Changes. The assistant now appears on every page.
Method 2: Child theme functions.php
Section titled “Method 2: Child theme functions.php”If you prefer not to use a plugin and have a child theme active, hook into the wp_footer action:
// Add PageClerk widget to WordPress footeradd_action('wp_footer', function() { ?> <script> window.pageclerkConfig = { chatbotId: "YOUR_CHATBOT_ID" }; </script> <script src="https://pageclerk.com/api/widget.js" defer></script> <?php});