Installation Guides
WordPress

WordPress Installation

Install the nuhello chatbot on your WordPress website.

Method 1: Using a Plugin (Recommended)

The easiest way to add the chatbot to WordPress is using the Insert Headers and Footers plugin.

Step 1: Install the Plugin

  1. Go to Plugins → Add New in your WordPress admin
  2. Search for "Insert Headers and Footers" by WPCode
  3. Click Install Now and then Activate

Step 2: Add the Script

  1. Go to Code Snippets → Header & Footer (or Settings → Insert Headers and Footers)
  2. Paste your nuhello script in the Header section:
<script>
  window.nuhelloSettings = {
    key: "YOUR_PIXEL_KEY",
    botId: "YOUR_BOT_ID"
  };
  (function() {
    var s = document.createElement('script');
    s.src = 'https://cdn.nuhello.com/widget.js';
    s.async = true;
    document.head.appendChild(s);
  })();
</script>
  1. Click Save Changes

Method 2: Theme Editor

If you prefer not to use a plugin, you can add the script directly to your theme.

Step 1: Access Theme Editor

  1. Go to Appearance → Theme File Editor
  2. Select your active theme from the dropdown

Step 2: Edit header.php

  1. Find and click on header.php in the file list
  2. Locate the </head> tag
  3. Paste your nuhello script just before </head>:
<script>
  window.nuhelloSettings = {
    key: "YOUR_PIXEL_KEY",
    botId: "YOUR_BOT_ID"
  };
  (function() {
    var s = document.createElement('script');
    s.src = 'https://cdn.nuhello.com/widget.js';
    s.async = true;
    document.head.appendChild(s);
  })();
</script>
</head>
  1. Click Update File

Note: This method may be overwritten when you update your theme. Consider using a child theme or the plugin method.

Method 3: Using functions.php

Add the script via WordPress hooks for a cleaner approach:

  1. Go to Appearance → Theme File Editor
  2. Select functions.php
  3. Add this code at the end:
function add_nuhello_chatbot() {
    ?>
    <script>
      window.nuhelloSettings = {
        key: "YOUR_PIXEL_KEY",
        botId: "YOUR_BOT_ID"
      };
      (function() {
        var s = document.createElement('script');
        s.src = 'https://cdn.nuhello.com/widget.js';
        s.async = true;
        document.head.appendChild(s);
      })();
    </script>
    <?php
}
add_action('wp_head', 'add_nuhello_chatbot');
  1. Click Update File

Clear Your Cache

After installation, clear any caching plugins you may have:

  • WP Super Cache: Settings → WP Super Cache → Delete Cache
  • W3 Total Cache: Performance → Dashboard → Empty All Caches
  • LiteSpeed Cache: LiteSpeed Cache → Toolbox → Purge All
  • WP Rocket: Settings → WP Rocket → Clear Cache

Verify Installation

  1. Visit your website in a new browser tab
  2. The chat widget should appear in the bottom-right corner
  3. Click on it to start a conversation

Troubleshooting

Widget not showing?

  1. Clear your browser cache and WordPress cache
  2. Check if any security plugins are blocking external scripts
  3. Ensure the script is placed correctly before </head>
  4. Check browser console (F12) for errors

Conflicts with other plugins?

Some optimization plugins may interfere with the script. Try:

  • Excluding the nuhello script from minification
  • Adding cdn.nuhello.com to your CDN/optimization whitelist