Skip to main content

Creating Your Chat Widget

Setting up a chat widget in Recepta.ai is quick and straightforward. This guide will walk you through the entire process from creation to deployment.
1

Access Chat Widget Page

Navigate to the Chat Widget section in your Recepta.ai dashboard
2

Configure Widget Settings

Customize the appearance and behavior of your widget
3

Generate Embed Code

Get the HTML code to add to your website
4

Deploy to Your Website

Add the embed code to your website and test functionality

Widget Configuration

Basic Settings

Widget Title

Default: “Chat with us”
  • Appears in the chat header
  • Keep it friendly and inviting
  • Examples: “Need Help?”, “Ask us anything”, “Live Support”

Primary Color

Default: #667EEA
  • Main color for buttons and accents
  • Should match your brand colors
  • Use hex color codes (e.g., #FF5733)

Position Settings

Choose where the chat widget appears on your website:
{
  "position": "bottom-right",
  "margin": {
    "bottom": "20px",
    "right": "20px"
  }
}
Best for: Most websites, standard expectation

Step-by-Step Setup Guide

Step 1: Configure Widget Appearance

Chat Widget Configuration Interface
  1. Widget Title: Enter a welcoming title for your chat widget
    Examples:
    - "Chat with us"
    - "Need help?"
    - "Ask our AI assistant"
    - "Get instant support"
    
  2. Primary Color: Choose your brand color
    • Use the color picker for visual selection
    • Or enter a hex code directly
    • Preview updates in real-time
  3. Position: Select widget placement
    • Bottom-right (recommended for most sites)
    • Bottom-left (alternative placement)

Step 2: Preview Your Widget

The preview section shows exactly how your widget will appear:

Minimized View

  • Floating button in selected corner
  • Shows your chosen color scheme
  • Displays hover effects

Widget Details

  • Title display
  • Color scheme preview
  • Position confirmation

Step 3: Generate and Copy Embed Code

Once you’re satisfied with your configuration:
  1. Create/Update Widget: Click the action button
  2. Copy Embed Code: Use the “Copy Code” button
  3. Copy Script URL: Alternative installation method
The embed code is unique to your account and widget configuration. Keep it secure and only use it on your authorized domains.

Embed Code Implementation

Standard Implementation

Add this code just before the closing </body> tag on your website:
<!-- Recepta.ai Chat Widget -->
<script>
(function() {
  var script = document.createElement('script');
  script.src = 'YOUR_SCRIPT_URL_HERE';
  script.async = true;
  script.defer = true;
  document.head.appendChild(script);
})();
</script>

Advanced Implementation Options

Method 1: Theme Functions
function add_recepta_chat_widget() {
    ?>
    <script>
    // Your embed code here
    </script>
    <?php
}
add_action('wp_footer', 'add_recepta_chat_widget');
Method 2: Plugin
  • Install a custom code plugin
  • Add embed code to footer scripts
  • Configure on specific pages if needed

Testing Your Widget

After implementation, thoroughly test your widget:

Functionality Checklist

  • Widget appears in correct position
  • Colors match your brand
  • Title displays correctly
  • Responsive on mobile devices
  • No layout conflicts with existing elements
  • Chat opens when clicked
  • AI responds to messages
  • Conversation flows naturally
  • Typing indicators work
  • Messages display properly
  • Page load time not affected
  • Widget loads asynchronously
  • No JavaScript errors
  • Works on different browsers
  • Mobile performance is good

Test Conversation Examples

Try these conversation starters to test your widget:
Basic Questions:
- "What are your business hours?"
- "How can I contact you?"
- "What services do you offer?"

Product/Service Inquiries:
- "Can you tell me about your pricing?"
- "Do you offer consultations?"
- "How do I get started?"

Support Scenarios:
- "I need help with my order"
- "I have a technical question"
- "Can I speak to someone?"

Configuration Updates

Updating Existing Widgets

To modify your widget configuration:
  1. Access Widget Settings: Return to the Chat Widget page
  2. Make Changes: Update title, color, or position
  3. Update Widget: Click the update button
  4. Automatic Deployment: Changes apply automatically (no code changes needed)
Widget updates are applied in real-time without requiring code changes on your website.

Managing Multiple Widgets

Currently, each account supports one active chat widget. If you need multiple widgets for different domains or purposes, contact support for enterprise options.

Troubleshooting

Common Issues and Solutions

Possible Causes:
  • Embed code not added correctly
  • JavaScript blocked by browser/ad blocker
  • CSS conflicts hiding the widget
  • Script loading errors
Solutions:
  • Verify embed code placement before </body>
  • Check browser console for errors
  • Test in incognito/private mode
  • Ensure script URL is accessible
Possible Causes:
  • Network connectivity issues
  • API key problems
  • Agent not configured properly
  • Service downtime
Solutions:
  • Check internet connection
  • Verify widget ID is correct
  • Ensure AI agent is active
  • Contact support if persistent
Possible Causes:
  • CSS conflicts with existing styles
  • Z-index issues
  • Mobile responsiveness problems
Solutions:
  • Use browser developer tools to inspect
  • Adjust CSS priorities if needed
  • Test on different screen sizes
  • Consider position alternatives

Performance Optimization

Best Practices

Loading Performance

  • Load widget asynchronously
  • Use defer attribute
  • Minimize initial payload
  • Lazy load when needed

User Experience

  • Position thoughtfully
  • Use brand-consistent colors
  • Test on mobile devices
  • Monitor response times

Monitoring and Analytics

Track widget performance through your dashboard:
  • Conversation Volume: Daily/weekly chat counts
  • Response Times: Average AI response speed
  • User Satisfaction: Post-chat feedback scores
  • Conversion Tracking: Leads generated through chat

Next Steps


Your chat widget is now live! Monitor its performance and iterate based on customer feedback and analytics data.