What you’ll get

When you integrate Pointer into your documentation site, your users will have access to:

  • Answer engine: instant answers to user questions based on your documentation content and knowledge base

Prerequisites

  • A documentation website (any framework: Mintlify, GitBook, Docusaurus, VitePress, etc.)
  • Access to edit your site’s HTML or add custom scripts
  • A Pointer project with your project ID

Installation

Perfect for any documentation site where you can add custom HTML/JavaScript.

1

Get your project ID

  1. Login to the Pointer dashboard
  2. Create a new project or select an existing one
  3. Copy your project ID from the setup section
2

Add the script tag

Add the Pointer script to your documentation site. The exact location depends on your platform:

<script src="https://cdn.pointer.so/pointer-sdk@latest/pointer.browser.js?projectId=pt_proj_your-project-id"></script>
3

Platform-specific setup

4

Verify the integration

Reload your documentation site and look for the Pointer widget in the bottom-right corner. You can test the connection in your project settings.

Best practices

Allowed origins

Always configure allowed origins in your project settings to prevent unauthorized use of your project ID.

Performance

  • Pointer automatically lazy loads to minimize impact on your documentation site’s load time
  • Consider loading the script asynchronously to avoid blocking page rendering
  • The widget only loads when needed, keeping your docs fast

Content optimization

  • Pointer works best when it has access to your documentation content
  • Add your documentation as a knowledge source to improve answer quality
  • Consider adding FAQ content and troubleshooting guides to your knowledge base

Advanced configuration

Custom triggers

If you want the Pointer widget to appear on a specific button instead of the default floating widget:

  1. On the playground page, toggle “Set custom trigger” to true and set the trigger ID.
  1. Create your custom trigger button in your documentation:
<button id="help-button" style="
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
">
  Ask AI Assistant
</button>
  1. Update your script to include the trigger ID:
pointer.js
(function() {
  const script = document.createElement('script');
  script.src = 'https://cdn.pointer.so/pointer-sdk@latest/pointer.browser.js?projectId=pt_proj_your-project-id&triggerId=help-button';
  script.async = true;
  document.head.appendChild(script);
})();

Conditional loading

Load Pointer only on specific pages or for certain users:

// Only load on documentation pages
if (window.location.pathname.startsWith('/docs/')) {
  const script = document.createElement('script');
  script.src = 'https://cdn.pointer.so/pointer-sdk@latest/pointer.browser.js?projectId=pt_proj_your-project-id';
  script.async = true;
  document.head.appendChild(script);
}

Environment-specific loading

pointer.js
// Only load in production
if (window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
  const script = document.createElement('script');
  script.src = 'https://cdn.pointer.so/pointer-sdk@latest/pointer.browser.js?projectId=pt_proj_your-project-id';
  script.async = true;
  document.head.appendChild(script);
}

Next steps

After successfully integrating Pointer into your documentation:

1

Add knowledge sources

Upload your documentation content, FAQ, and troubleshooting guides in the knowledge section to train your AI assistant.

2

Customize the experience

Use the playground to customize your widget’s appearance and responses to match your documentation style.

3

Monitor usage

Track how users interact with your AI assistant in the analytics dashboard to identify knowledge gaps.

4

Optimize content

Based on user questions, continuously improve your documentation and knowledge base to provide better answers.