Creating a form to embed onto a website

Forms are the backbone of online lead generation. Whether you’re running a blog, an e-commerce site, or a B2B landing page, having a well-placed form can turn anonymous visitors into qualified leads. 

While basic HTML forms collect data, they don’t give you the power to nurture those leads. That’s where Mautic, the open-source marketing automation platform, comes in.

In this blog, we’ll walk through how to create, customise, and embed a Mautic form onto your website, and how to connect it to campaigns that drive real results.

1. Why embedded forms matter for lead generation

An embedded form allows you to collect valuable contact details directly from your website traffic. Unlike external landing pages, embedded forms keep visitors on your site, reducing friction and improving conversion rates.

With Mautic, forms do more than just capture names and emails:

  • They can automatically add contacts to segments.
  • Trigger personalised email sequences.
  • Attribute leads to their traffic source (e.g., SEO, paid ads, referrals).

This makes them a powerful tool for turning organic visitors into loyal customers.

2. Setting up your form

For most lead generation purposes, it’s a good idea to begin nurturing within a campaign once you secure their details.

Add fields like:

  • First Name
  • Last Name
  • Email Address
  • Phone (optional)

A lead generation form with fields like First Name, Last Name, Email, and Phone can integrate directly with your CRM by mapping each field to the corresponding newly created contact record. This ensures new leads are automatically added into your CRM system, and all information is visible to the sales team to take next steps.

Remember, simple, optimised, and easy-to-fill online forms can help your conversion rate.

Mautic goes one step further, providing options for what type of form you’d like to create. Inside your Mautic dashboard, navigate to:
Components → Forms → New

You’ll be prompted to choose between:

  • Campaign Forms – Designed to trigger actions in automated campaigns (e.g., nurture sequences).
  • Standalone Forms – Collect data without automation (e.g., simple newsletter signup).

3. Customising the form for better conversions

Mautic’s drag-and-drop editor makes customisation simple. Some best practices:

  • Use clear CTAs – Replace “Submit” with action-oriented text like Get My Free Guide.
  • Apply conditional logic – Show extra fields only when needed.
  • Add hidden fields – Track UTM parameters, SEO keywords, or campaign IDs.
  • Styling – Use custom CSS to ensure the form matches your website’s branding.

4. Embedding the Form Into Your Website

Once your form is ready, click Embed in the Mautic form settings. You’ll see two options:

  1. JavaScript embed
    • Easiest option. Any changes in Mautic automatically reflect on your site.
    • Recommended for most users.
  2. HTML embed
    • Gives you full control over the code and styling.
    • Changes require re-copying code if you edit the form in Mautic.

Paste the code snippet into your site’s HTML, WordPress block editor, or CMS template where you want the form to appear.

5. Connecting the form to a campaign

Now that your form is live, you can decide what happens when someone fills it out.

Typical Mautic campaign actions include:

  • Sending a welcome email.
  • Adding the contact to a nurture sequence.
  • Assigning the lead to a sales team segment.
  • Adding a tag based on the source of the submission.

This is the step that transforms a basic form into real results.

6. Measuring success & optimisation

Forms are only as good as the results they deliver. With Mautic, you can:

  • Track submissions directly in the dashboard.
  • Measure conversion rates by traffic source.
  • Run A/B tests on form copy or placement.

Adjust campaign workflows if leads drop off early.

Creating a form in Mautic and embedding it on your website is more than just a way to collect email addresses. It’s the first step in a powerful marketing automation process that can nurture leads, personalise their experience, and ultimately grow your business.

Start small with a simple form today, and then expand with segments, campaigns, and advanced tracking as your marketing matures.

Posted in Marketing Mautic

About Author: Bradley Finch

Hi, I'm Brad, a marketing executive at enable. I write about marketing automation and how technology can make marketing more effective and less complicated. My goal is to share clear, practical insights that help people get real results!

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*