Recommended method
- 1. Install a trusted header and footer code plugin.
- 2. Open the plugin's footer scripts section.
- 3. Paste the NileFlow installation script.
- 4. Apply it across the entire website.
- 5. Save and clear the WordPress cache.
Install your AI assistant on a website, approve the domains where it can appear and prepare WhatsApp for customer conversations.
One-time installation
Add the script once and manage the assistant in NileFlow.
Step 1
Complete the assistant configuration before adding it to a public website. This prevents visitors from seeing an unfinished assistant.
A completed NileFlow workspace
Approved business knowledge added to your assistant
A Website Widget connection created in the dashboard
Your website domain added to Allowed Origins
Your unique NileFlow widget installation script
Add every approved domain
If your website works with both https://example.com and https://www.example.com, add both addresses to Allowed Origins.
Plain HTML
For a standard HTML website, paste your installation script before the closing body tag on every page where the assistant should appear.
<script
src="https://nileflow-five.vercel.app/widget/nileflow.js"
data-widget-key="YOUR_WIDGET_KEY"
async
></script> <main>
Your website content
</main>
<script
src="https://nileflow-five.vercel.app/widget/nileflow.js"
data-widget-key="YOUR_WIDGET_KEY"
async
></script>
</body>
</html>Next.js and React
Add the external script once inside the root layout so the assistant is available across the entire website.
import Script from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://nileflow-five.vercel.app/widget/nileflow.js"
data-widget-key="YOUR_WIDGET_KEY"
strategy="afterInteractive"
/>
</body>
</html>
);
}Some hosting systems may transform framework-managed scripts. In that case, use a normal lowercase script element inside the root layout.
<script
src="https://nileflow-five.vercel.app/widget/nileflow.js"
data-widget-key="YOUR_WIDGET_KEY"
async
></script>WordPress
The safest method is to use a header and footer code plugin so the script remains installed when the WordPress theme is updated.
<script
src="https://nileflow-five.vercel.app/widget/nileflow.js"
data-widget-key="YOUR_WIDGET_KEY"
async
></script>Website builders
Most website builders provide a global script, footer code or HTML embed feature. Install NileFlow once in the area that loads across all pages.
Open your active theme code and place the NileFlow script before the closing body tag in theme.liquid.
Use Custom Code in your Wix dashboard, paste the script, apply it to all pages and load it in the body.
Open Project Settings, go to Custom Code and paste the script inside the footer code section.
Use the custom code or embed element and make sure the installation script is included on every page.
Add the external script once in the application root, main HTML template or shared layout.
Look for Custom Code, Footer Code, Tracking Code, HTML Embed or Global Scripts in the platform settings.
WhatsApp connections use Meta's official business tools. Complete the business verification and number setup before enabling automated customer conversations.
Never paste permanent access tokens into website code or public documents. WhatsApp secrets should only be saved inside secure NileFlow environment settings.
Troubleshooting
Most widget problems are caused by domain permissions, cached website files or the script being added to only one page.
Confirm that the widget is enabled, the correct script was installed and the current website domain is included in Allowed Origins.
Add the production domain to Allowed Origins. A local address such as localhost is different from the live domain.
Clear the website host, CDN and browser cache. On Hostinger, wait for the deployment to become Current and then purge the website cache.
Add every approved variation separately, including both the bare domain and www version when your website uses both.
Check the Website Widget connection status, confirm that the assistant has business knowledge and review the connection health in NileFlow.
Make sure the site is loading the newest NileFlow script. Clear cached HTML and JavaScript after deployment changes.
Security
The widget installation key identifies a public assistant connection. Private provider tokens and database credentials must never be included in the installation script.
Create a workspace, add your approved business information and configure the website assistant from the NileFlow dashboard.