Smart Intake

WordPress Integration

Capture forms from any website with zero code.

Integrate Kantos with your WordPress site to automatically capture form submissions from any page. Whether you use Contact Form 7, WPForms, Gravity Forms, or native WordPress forms, Kantos captures them all.

What You'll Need

  • A WordPress site (self-hosted or WordPress.com Business plan)
  • Admin access to your WordPress dashboard
  • Your Kantos organization slug and API key

Method 1: Theme Editor (Recommended)

Add the Universal Script directly to your theme for site-wide form capture. This works with all WordPress themes.

Step

Access Theme Editor

In WordPress admin, go to Appearance → Theme File Editor (or Theme Editor in older versions).

Step

Open header.php

From the theme files list on the right, click on "header.php" (or "Theme Header").

Step

Add the Script

Find the </head> closing tag and paste the Universal Script just before it.

Step

Update File

Click "Update File" to save your changes. The script is now active on all pages.

header.phphtml
<!-- Add this just before </head> -->
<script
  src="https://kantos.ai/api/intake/script/YOUR_ORG_SLUG"
  async>
</script>

Child Themes Recommended

If you edit header.php directly, your changes may be lost when the theme updates. Consider using a child theme or the plugin method below for permanent changes.

Method 2: Insert Headers and Footers Plugin

For a safer, update-proof method, use a plugin to inject the script. This is the recommended approach for most users.

Step

Install the Plugin

Go to Plugins → Add New and search for "Insert Headers and Footers" by WPCode (formerly WPBeginner). Install and activate it.

Step

Open Code Snippets

Go to Code Snippets → Header & Footer in your WordPress admin.

Step

Add to Header

Paste the Kantos script in the "Header" section.

Step

Save Changes

Click Save Changes. The script is now active site-wide.

Alternative Plugins

These plugins also work well for adding header scripts:

  • WPCode - Full code snippets manager
  • Header Footer Code Manager - Simple and lightweight
  • Scripts n Styles - Advanced script management

Method 3: functions.php

For developers who prefer code, add the script via your theme's functions.php file. Use a child theme to prevent losing changes on theme updates.

functions.phpphp
// Add Kantos Smart Intake Script
function kantos_smart_intake_script() {
    ?>
    <script
      src="https://kantos.ai/api/intake/script/YOUR_ORG_SLUG"
      async>
    </script>
    <?php
}
add_action('wp_head', 'kantos_smart_intake_script');

Conditional Loading

Load the script only on specific pages to optimize performance:

functions.phpphp
// Load Kantos script only on contact and landing pages
function kantos_smart_intake_script() {
    // Only load on specific pages
    if (is_page('contact') || is_page('demo') || is_page('get-started')) {
        ?>
        <script
          src="https://kantos.ai/api/intake/script/YOUR_ORG_SLUG"
          async>
        </script>
        <?php
    }
}
add_action('wp_head', 'kantos_smart_intake_script');

Compatible Form Plugins

The Universal Script works with all major WordPress form plugins. It intercepts form submissions automatically without any plugin-specific configuration:

PluginCompatibilityNotes
Contact Form 7FullWorks with all field types including file uploads
WPFormsFullLite and Pro versions both supported
Gravity FormsFullMulti-page forms captured on final submit
Ninja FormsFullConditional logic forms supported
Elementor FormsFullPro feature, works seamlessly
Formidable FormsFullComplex forms and calculators supported
Fluent FormsFullConversational forms captured
WooCommercePartialContact forms work; checkout uses separate integration

WordPress Native Contact Forms

If you're not using a form plugin, you can create forms with basic HTML or the WordPress Gutenberg block editor. The script captures these too:

<!-- Simple contact form in a Custom HTML block -->
<form id="contact-form">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required />

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required />

  <label for="message">Message</label>
  <textarea id="message" name="message" rows="4"></textarea>

  <button type="submit">Send Message</button>
</form>

Page Builder Compatibility

Forms created with popular page builders are automatically captured:

  • Elementor - Forms widget fully supported
  • Divi Builder - Contact Form module works
  • Beaver Builder - Contact Form module supported
  • WPBakery - Works with form shortcodes
  • Gutenberg - Form blocks and Custom HTML

Common Use Cases

Contact Page Form

Capture leads from your main contact page. The script automatically detects the form and sends submissions to your CRM.

Newsletter Signup

Capture email subscribers from footer or sidebar widgets:

<form id="newsletter-signup" class="newsletter-form">
  <input
    type="email"
    name="email"
    placeholder="Enter your email"
    required
  />
  <button type="submit">Subscribe</button>
</form>

Landing Page Lead Capture

For landing pages, include additional context with hidden fields:

<form id="landing-form">
  <input type="text" name="name" placeholder="Your Name" required />
  <input type="email" name="email" placeholder="Work Email" required />
  <input type="text" name="company" placeholder="Company" />

  <!-- Hidden fields for tracking -->
  <input type="hidden" name="form_source" value="pricing-page" />
  <input type="hidden" name="campaign" value="summer-promo" />

  <button type="submit">Get Pricing</button>
</form>

Multi-Step Forms

For Gravity Forms or other multi-step form plugins, the script captures all field values when the final submit occurs:

Field Naming

Use descriptive field names across all steps. The Universal Script combines all fields into a single submission regardless of which step they appeared on.

Excluding Forms

Some forms shouldn't be captured (like login forms or search). Exclude them with the data-kantos-ignore attribute:

<!-- This form will NOT be captured -->
<form action="/login" method="post" data-kantos-ignore>
  <input type="email" name="email" />
  <input type="password" name="password" />
  <button type="submit">Log In</button>
</form>

<!-- This form WILL be captured -->
<form id="contact">
  <input type="text" name="name" />
  <input type="email" name="email" />
  <button type="submit">Submit</button>
</form>

Excluding by CSS Class

For forms where you can't add the attribute directly (like plugin-generated forms), use CSS selectors in the script configuration:

<script
  src="https://kantos.ai/api/intake/script/YOUR_ORG_SLUG"
  data-ignore-selectors=".woocommerce-login, .search-form, #loginform"
  async>
</script>

Testing Your Integration

Step

Verify Script Loading

Open your site, right-click and "View Page Source". Search for "kantos" to confirm the script is present.

Step

Open Browser Console

Press F12 and go to the Console tab. Look for any Kantos-related errors.

Step

Submit a Test Form

Fill out a form on your site with test data (use a real email you control).

Step

Check Kantos Dashboard

Go to Smart Intake → Incoming Events. Your submission should appear within seconds.

Step

Verify Field Mapping

Click the submission to see how fields were captured. Adjust your form field names if needed.

Troubleshooting

Script Not Loading

  • Clear any caching plugins (WP Super Cache, W3 Total Cache, etc.)
  • Check if a security plugin is blocking external scripts
  • Verify the script is inside the <head> tag
  • Try a different installation method (plugin vs code)

Forms Not Being Captured

  • Check if the form has data-kantos-ignore attribute
  • Verify your API key is correct and not expired
  • Check browser console for JavaScript errors
  • Some AJAX forms need additional configuration—check plugin docs

Duplicate Submissions

If you're seeing duplicate submissions, you may have the script installed twice:

  • Check both header.php and any header plugins
  • Look for the script in theme settings (some themes have script injection)
  • Verify child theme isn't duplicating parent theme code

Form Plugin Still Sending Emails

The Kantos script captures form data but doesn't disable your form plugin's default behavior. If you want to stop duplicate notifications:

  • Contact Form 7: Remove email address from Mail tab
  • WPForms: Disable notifications in Form Settings
  • Gravity Forms: Remove notification emails

Caching Issues

If using a caching plugin, you may need to exclude the script or clear cache after making changes:

  • WP Super Cache: Clear cache after adding script
  • W3 Total Cache: Purge all caches
  • WP Rocket: Clear cache and preload
  • Cloudflare: Purge cache from Cloudflare dashboard

Performance Considerations

The Universal Script is optimized for minimal performance impact:

  • Size: ~3KB gzipped
  • Loading: Async loading doesn't block page render
  • Execution: Only activates on form interaction
  • Submission: Uses sendBeacon for non-blocking sends

Core Web Vitals

The script has minimal impact on Core Web Vitals. It loads asynchronously and doesn't affect LCP, FID, or CLS metrics significantly.

WordPress Multisite

For WordPress Multisite installations, you can add the script network-wide or per-site:

Network-Wide (All Sites)

Add the script to your network-activated theme or use a network-activated plugin like WPCode.

Per-Site

Activate and configure the script on each site individually. This allows different organization slugs per site if needed.

Next Steps

    WordPress Integration - Smart Intake | Kantos Docs