Chat Flow
Publish Bots
Web Deployment
WordPress

Embedding Your Bot in WordPress

Integrate your bot into your WordPress site effortlessly using the Indite Bot WordPress Plugin (opens in a new tab). This plugin simplifies the embedding process for Standard, Popup, or Bubble integrations.

Before proceeding, ensure you have created and published a bot in your Indite dashboard.

WordPress plugin embed preview

Getting Started

  1. Install the Plugin:

  2. Obtain the Embed Code:

    • Navigate to the Share tab in your bot’s Indite dashboard.
    • Click the WordPress button to copy the embed code or configuration details.
    • Follow the plugin’s instructions to add the bot to your site.

Ensure the bot ID in the plugin configuration matches your bot’s unique ID, found in the Share tab.

Configuring Excluded Pages

Control where your bot appears by specifying excluded pages in the plugin settings. Use a comma-separated list to define pages where the bot should not display.

Examples:

  • /app/*: Excludes all pages starting with /app/.
  • /app: Excludes only the /app page.
  • /app?param=1: Excludes the /app page with the query parameter param=1.
  • /app?param=*: Excludes the /app page with any value for the param query parameter.
  • /app/*?param=*: Excludes all pages starting with /app/ with any value for the param query parameter.

Enter the excluded pages in the plugin’s settings to prevent the bot from appearing on specific pages or sections of your site.

Personalizing the User Experience

Enhance the bot experience by prefilling variables with user-specific data from WordPress. These variables allow you to customize the bot’s behavior based on user context.

Available WordPress Variables:

  • Ensure variables in your bot match the exact syntax provided by the plugin (e.g., WP Email, not wp Email or WP email).
WordPress predefined variables

Steps to Enable:

  1. Install and activate the Indite Bot WordPress Plugin (opens in a new tab).
  2. Create variables in your bot’s variables dropdown (in the Indite dashboard) using the exact syntax (e.g., WP Email, WP User Name).
  3. The plugin will automatically inject these variables into your bot.
⚠️

Variable names are case-sensitive. For example, WP Email will work, but wp Email will not.

Troubleshooting Common Issues

If your bot isn’t displaying on your WordPress site, check the following:

LiteSpeed Cache with "Localise Resources" Enabled

  • If LiteSpeed’s "Localise Resources" feature is enabled, ensure https://cdn.jsdelivr.net is removed from the localized URLs list, as it’s used to load the bot’s embed library.

LiteSpeed Cache with JS Optimization

  • In LiteSpeed Cache’s Tuning Settings, add web.js and bot to the JS Excludes and JS Deferred Excludes fields to prevent caching issues.

WP Rocket or Other Caching Plugins

  • For WP Rocket:
    1. Navigate to Settings > WP Rocket > Advanced Rules > Excluded Inline JavaScript.
    2. Add bot to the excluded scripts list.
    3. Save changes.
WP Rocket configuration

Plugins Adding defer to External Scripts

  • If a plugin adds the defer attribute to external scripts, configure an exception for the bot’s scripts (e.g., web.js or bot) in the plugin’s settings.

Still Not Working?

  • Contact support directly through the bot in the bottom-right corner of the Indite application.
Indite Documentation v1.4.0
PrivacyTermsSupport