Quick Integration: Get started in minutes with just a few lines of code. The SDK handles ad fetching, tracking, and display automatically.
Installation
1
Install the package
2
Import and use
API Reference
ChatbotAd Component
Your unique publisher ID from the Kovio dashboard.
Comma-separated keywords to match ads. The SDK will find the most relevant ad based on these keywords.Examples:
Display theme for the ad. Choose between light and dark themes to match your application’s design.
Ad format type. Choose the format that best fits your layout.
Examples
- Basic Usage
- Multiple Keywords
- Light Theme
- Small Format
- Dynamic Keywords
Features
Ad Formats
- Standard Format
- Small Format
The standard format includes:
- Image (if available)
- Title
- Message/description
- “Learn more” button
Themes
- Dark Theme (Default)
- Light Theme
Dark background with light text. Perfect for dark mode interfaces.
TypeScript Support
The SDK includes full TypeScript definitions:TypeScript definitions are included automatically with the package. No additional
@types package needed.Advanced Usage
Custom Hooks
For advanced use cases, you can use the underlying hooks:React Native
The SDK also works with React Native:Error Handling
Best Practices
Use Relevant Keywords
Use Relevant Keywords
Match keywords to the conversation context. Use specific terms that relate to what the user is discussing.
Choose Appropriate Format
Choose Appropriate Format
Use
standard for prominent placements, small for inline content. Consider your layout and user experience.Match Your Theme
Match Your Theme
Use
light or dark to match your app’s design. This ensures ads feel native to your application.Update Keywords Dynamically
Update Keywords Dynamically
Change keywords based on user conversation context. This improves ad relevance and click-through rates.
Troubleshooting
Ad not showing?
Ad not showing?
- Check publisher ID - Verify your publisher ID is correct
- Check keywords - Ensure keywords are relevant and properly formatted
- Check console - Look for error messages in the browser console
- Verify network - Ensure your app can reach the Kovio API
TypeScript errors?
TypeScript errors?
Make sure you have TypeScript installed and the SDK types are being recognized. The SDK includes type definitions automatically.
Component not rendering?
Component not rendering?
- Check that all required props are provided
- Verify the component is imported correctly
- Ensure React is properly installed and configured
