Guide AI Smile

AI Smile Widget Integration Guide: 5 Methods Explained

Step-by-step guide to integrating AI smile simulation on your dental website. Covers direct links, iframe embedding, JavaScript SDK, advanced API, and custom form integration for agencies.

10 min read

Choose Your Integration Method

DentalPrice AI Smile offers five integration methods, each designed for a different use case and technical comfort level. You can start with the simplest option and upgrade later without losing any data or configuration.

All five methods use the same AI engine, produce the same quality transformations, and connect to the same admin dashboard. The only difference is how you deliver the experience to your patients.

  • All 5 methods use the same AI engine and quality
  • Start simple and upgrade anytime — no data loss
  • All integrations connect to your single admin dashboard
  • Choose based on your technical comfort level and needs

Method 2: iframe Embed (60 Seconds)

The most popular method — copy-paste a single line of HTML into your website:

Works with: WordPress, Wix, Squarespace, Webflow, custom HTML, and any website builder that supports HTML embedding.

Important: The iframe includes camera permission attributes (allow="camera") so patients can take a selfie directly in the widget. Without this attribute, camera access will be blocked by the browser.

Recommended placement: - Homepage hero section or below-the-fold CTA - Individual service pages (veneers, implants, whitening, orthodontics) - Dedicated 'Virtual Smile Makeover' landing page - Contact/consultation booking page

Responsive design: The widget automatically adapts to the container width. Set the iframe width to 100% for responsive behavior on mobile and desktop.

  • Single line of HTML — copy from admin dashboard and paste
  • Works with WordPress, Wix, Squarespace, and any CMS
  • Camera permission must be included in iframe attributes
  • Responsive — adapts to mobile and desktop automatically

Method 3: SDK Auto-Render (2 Lines of Code)

For developers who want slightly more control than an iframe but still want minimal setup:

Add a script tag to load the widget SDK, then place a div with data attributes where you want the widget to appear. The SDK reads the data attributes and renders automatically.

Advantages over iframe: - Better scrolling behavior (no nested scroll) - Native look and feel within your page - Slightly faster load time - No cross-origin restrictions for camera

  • 2 lines: script tag + div with data attributes
  • Better scrolling and native feel vs iframe
  • No cross-origin camera restrictions
  • Auto-renders without JavaScript initialization code

Method 4: SDK Advanced (Full JavaScript Control)

For developers and agencies who need complete programmatic control:

The advanced SDK exposes SmileWidget.render() with a full options object: container element, public key, theme configuration (colors, border radius), and callback functions for every lifecycle event.

SDK Events you can listen to: - smile_widget_lead_submitted — Patient submitted their contact info - smile_widget_transformation_completed — AI generated the result - smile_widget_upload_clicked — Patient clicked upload (intercept point) - smile_widget_camera_clicked — Patient clicked camera (intercept point) - smile_widget_error — Something went wrong

These events let you trigger custom analytics, CRM updates, marketing automation workflows, or any custom logic when patients interact with the widget.

  • Full SmileWidget.render() API with theme and callback options
  • 5 lifecycle events for deep integration
  • Custom analytics triggers on every user action
  • CRM and marketing automation integration via events

Events are delivered via postMessage, making them compatible with any JavaScript framework — React, Vue, Angular, vanilla JS, or even server-side event handlers via WebSocket bridges.

Method 5: Custom Form Integration (Agency Power)

The most advanced option — designed for marketing agencies managing multiple dental clients:

Intercept the upload or camera button click, show your own custom lead capture form (Salesforce, HubSpot, ClickFunnels, or custom HTML), collect the data you need, then resume the widget flow. The patient experiences a seamless journey while your form captures leads into your preferred CRM.

Agency workflow: 1. Widget loads on client's website 2. Patient clicks 'Upload Photo' or 'Take Selfie' 3. SDK fires smile_widget_upload_clicked event 4. Your code shows a custom lead form (name, email, phone, procedure interest) 5. Patient fills out the form, data goes to your CRM 6. Your code calls SmileWidget.resume() to continue the transformation 7. Patient sees their new smile

This gives agencies complete control over lead capture while leveraging DentalPrice's AI transformation engine. You own the lead data in your CRM from the very first interaction.

  • Intercept any button click to inject custom forms
  • Works with Salesforce, HubSpot, ClickFunnels, or custom HTML
  • SmileWidget.resume() continues the flow after form submission
  • Agency owns lead data in their CRM from the first interaction
  • Seamless patient experience — form feels like part of the widget

Agencies: use the custom form integration to add procedure-interest checkboxes (veneers, whitening, implants, orthodontics) to your lead form. This pre-qualifies leads before they even see their transformation — giving the dental practice higher-quality consultation bookings.

Start Integrating AI Smile Today

Try AI Smile

Frequently Asked Questions

Start with the iframe embed — it takes 60 seconds and works on any website. You can always switch to the SDK later for more customization. If you're a marketing agency, go directly to Method 5 (Custom Form Integration) to capture leads into your CRM.

Yes. Many practices use an iframe embed on their website AND share the direct link via social media and email. All methods use the same public key and connect to the same dashboard, so all leads appear in one place regardless of how the patient accessed the simulation.

Yes. All integration methods are fully responsive and mobile-optimized. On mobile, patients can take a selfie directly using their phone camera or upload an existing photo. The camera integration uses the device's native camera interface for the best experience.

Start Integrating AI Smile Today

Let patients preview their smile transformation before booking a consultation.

Try AI Smile