Website Assistant · JS SDK

Integrate Pop Website Assistant into Your Website

With a single line of script, integrate Pop's AI customer service, knowledge base Q&A, and visitor analysis into your existing website. No backend modifications or changes to existing business logic required to gain a suite of intelligent website assistant capabilities.

Knowledge Base-Driven ResponsesVisitor Statistics and Behavior AnalysisVisual Workflow Integration

Intelligent Customer Service

Visitors see the Pop website assistant in the bottom right corner of the webpage

Hello, I am the AI assistant

Can answer questions, recommend solutions, etc.

🧠
Smart Assistant

Complete Website Assistant Integration in 3 Minutes

You only need to create a site in Pop and paste the following script into your website's HTML, with no backend code modifications required.

  1. 1Create a new "Site" in the Pop client, configuring the domain and basic information.
  2. 2Select or create a "Knowledge Base" for the site to answer visitor questions.
  3. 3Insert the following JS snippet in the <head> or at the end of the <body>, and replace the data-key.
  4. 4Refresh the page to see the Pop website assistant in the lower right corner of the webpage, and you can view the data in Pop.

Embed JS SDK Example

Frontend One-Line Script

It is recommended to place the script in a template file that loads on all pages (such as a layout file or common footer) to ensure statistics and assistant entry work across the entire site.

<script src="https://connect.popllm.com/sdk.js" data-key="your site key"></script>

Three Core Capabilities of Website Assistant

Pop Website Assistant is not an isolated widget, but a complete solution integrated with your knowledge base, workflow, and site analytics.

Knowledge Base-Driven Answers

All answers are built upon your knowledge base, ensuring content is controllable, auditable, and sustainably iterable.

  • Supports unified retrieval from multiple sources including PDFs, documents, web pages
  • Website assistant answers automatically evolve when knowledge base is updated

AI Website Chat

Provides 24/7 intelligent customer service in the bottom right corner of your webpage, automatically answering common questions and guiding human intervention when necessary.

  • Configurable welcome messages, theme colors, and entry positions
  • Supports multi-turn context, remembering the visitor's current session intent

Visitor Behavior and Statistical Analysis

Integrate the same JS SDK to simultaneously gain visitor analytics capabilities, understanding who, when, where, and through what paths accessed your website.

  • Basic metrics: PV/UV, source channels, devices and browsers
  • Behavioral perspective: Access paths, dwell time, conversation triggers

Visual Workflow Integration

Connect questions received by the website assistant with Pop workflows, forming a closed loop from 'inquiry' to 'completion'.

  • Common Q&A can be directly answered by the website assistant, complex issues are automatically distributed to workflows
  • Supports various processing methods including approval flows, ticket flows, message pushes, document generation

Multi-site and Multi-entry Management

One Pop website assistant can simultaneously serve multiple sites and subdomains, supporting independent configuration of knowledge bases, theme styles, and entry positions for different business lines.

  • Supports distinguishing between different sites such as production sites, documentation sites, campaign pages
  • Each site can be independently configured with welcome messages, colors, and knowledge base scope

Flexible Configuration and Security Control

Through the visual configuration center, centrally manage site keys, access permissions, and data retention policies, balancing ease of use with security.

  • Centralized management of site keys, IP restrictions, cross-domain settings, etc.
  • Supports environment-specific configurations and role-based control of visible data scope

Complete Process from Visitor Inquiry to AI Auto-Reply

The following uses Pop Site Assistant as an example to demonstrate how a visitor initiates an inquiry on a webpage, which then goes through the SDK, session engine, and knowledge base retrieval, ultimately automatically generating high-quality responses.

  1. 1
    Visitor Initiates Inquiry

    The visitor clicks the bottom-right bubble or conversation entry, enters a question on the current page; the SDK automatically includes contextual information such as pageUrl, siteKey, language, session ID, etc.

  2. 2
    Session Gateway Access

    After receiving the request, the Pop session gateway creates/continues the session, records the channel (Web), entry page, visitor identifier, and standardizes the 'user question + context' into a unified Query.

  3. 3
    Knowledge Base Matching and Retrieval

    Based on siteKey, business grouping, and language configuration, select the corresponding knowledge base collection; first use BM25/keyword retrieval to recall candidates, then use a vector model (e.g., bge-m3) for semantic similarity ranking, filtering out low-confidence results.

  4. 4
    Generate Response and Fallback Strategy

    Deduplicate and reorganize the matched document fragments, send key information along with conversation history to the large model; if the hit confidence is low, choose 'fixed fallback wording' or 'let the model answer freely' based on site configuration.

  5. 5
    Return to Frontend and Track Statistics

    The final AI response is sent back to the webpage via the SDK, rendered as a conversation bubble, while tracking metrics such as session count, message count, whether the knowledge base was hit, etc., for subsequent statistical analysis in the 'Session Count / Bounce Rate / Dwell Time' dashboard.

Flow visualization diagram

Relationship diagram / Sankey / Flow chart dynamically displays the flow path of "Visitor → Session Gateway → Knowledge Base → Large Model → Response", with real-time statistical data overlaid.

1
Visitor Browser / SDK
2
Session Gateway (Session Engine)
3
Knowledge Base Retrieval (BM25 + Vector)
4
Large model generates response
5
Chat window display & statistics tracking

Integration Methods with Other Pop Modules

The Website Assistant is part of Pop's overall capabilities; it can be used with Knowledge Base, Workflow, and Application modules to build a complete chain from "visitor inquiries" to "internal automated processing."

  1. 1When visitors ask complex questions, trigger internal approval or ticket workflows.
  2. 2Accumulate high-frequency Q&A back into the knowledge base to form reusable FAQs and help documentation.
  3. 3Combine site statistics to analyze which pages and questions are more likely to drive conversions or lead to churn.

You can think of the website assistant as the 'front desk' of your website, while the Pop client and workflows are your 'back-end hub': the front desk handles reception and question collection, while the back-end manages organization, decision-making, and execution.

Frontend × Backend Collaboration Demo

The Website Assistant is part of Pop's overall capabilities; it can be used with Knowledge Base, Workflow, and Application modules to build a complete chain from "visitor inquiries" to "internal automated processing."

Website Frontend: Reception and Collection

The website assistant is embedded in the bottom right corner of the webpage, responsible for displaying conversation entry points, collecting visitor questions and access paths, and transmitting them in real-time to Pop.

Pop Backend: Organization and Processing

In the backend, workflows and knowledge bases handle question distribution, approval, and knowledge accumulation. High-frequency questions are written into FAQs, and processing results are then returned to visitors through the website assistant.

Integrate Pop Website Assistant for Your Site Now

Whether you're operating a Landing Page, documentation site, or backend system, as long as you can insert a piece of JS, you can enable your website with intelligent customer service and visitor insights.