Integrating Lead Capture Forms Into Third-Party Websites

  • Last updated on June 11, 2025 at 9:43 PM

It is possible to build a lead capture form inside of a website platform that sends the lead directly into AttractWell, tags them, and sends out a campaign and other automation associated with landing pages.

To do that, there are three steps to get this set up:

  1. Create a landing page, which is where you specify tags, campaigns, etc.
  2. Add the HTML code to the website itself, which will then send the lead into AttractWell.
  3. Contact support and let us know the domain name of the site this will be coming from, so we can white list your domain name.

Step 1: Creating and Setting Up Your Landing Page

The first step is to create a dedicated landing page within your AttractWell account. You can set this up here: https://attractwell.com/app/contacts/landing-pages. This page will act as the invisible middleman that receives information when a potential lead fills out a form on your external website.

Here's how to set it up:

  • Landing Page Settings: Assign a name to your landing page for your reference and select a link path that will be the target URL for form submissions. Once your landing page is published, you'll use the live version's URL in the custom code that you'll place on your WordPress site. Learn more about setting up a landing page in our article: How to Set Up a Landing Page.
  • Campaign and Tags: Link the landing page to a campaign to trigger automated follow-up actions or apply tags to sort new leads into specific segments within your AttractWell account. Detailed instructions on campaigns can be found in our guide: Understanding Campaigns, and for tagging contacts, see Using Contact Tags.
  • Post-Registration Action: Normally, here you would decide where to direct leads after registration. However, for the purpose of this integration, the redirection will be configured manually in the code during the subsequent steps. This section is simply to ensure the landing page setup is complete.
  • Require These Fields: Determine which pieces of information (like name and email) are required from leads. This ensures you gather essential data for future outreach and engagement.
  • Add to Vaults: If you're offering free resources or memberships, you have the option to automatically enroll new leads into a vault. Remember, this functionality is applicable only for vaults that are free of charge.

Step 2: Embedding the HTML Code into Your Website

Next, add the following code to your website. The text shown in bold, underlined, and red should be modified to your situation above. Also, it will need to be styled according to your needs.

<form method="post" action="https://attractwell.com/MyName/app/contact-me-form">
<div style="margin-bottom:10px;">
<label for="contact-name">Your Name</label><br>
<input type="text" id="contact-name" name="contact-name" value="">
</div>
<div style="margin-bottom:10px;">
<label for="contact-name">Your Email</label><br>
<input type="text" id="contact-email" name="contact-email" value="">
</div>
<div style="margin-bottom:10px;">
<label for="contact-phone">Your Phone</label><br>
<input type="text" id="contact-phone" name="contact-phone" value="">
</div>
<button type="submit">Sign Up</button>
<input type="hidden" name="contact-source" value="Web Form">
<input type="hidden" name="utm_source" value="Your Website Name Here">
<input type="hidden" name="registration-source" value="external">
<input type="hidden" name="subscribe-email" value="1">
<input type="hidden" name="landing_path" value="email-and-text-leads"> <!-- change this to be the link path for your the landing page that has the settings you'd like when someone registers -->
<input type="hidden" name="route-to" value="(paste in your URL here between the quotes where you want people to go after they register)">
</form>

Step 3: Modifying the code

  1. Locate Your Unique AttractWell Account Name: The action URL in the form code includes a placeholder for your account name: "https://attractwell.com/MyName/app/contact-me-form". Replace "MyName" with your unique AttractWell account name. You can find this name in your account profile under My Contact Info
  2. Locate Your Landing Page link path: Within the landing page settings in AttractWell, identify the link path you've set. This will replace value="email-and-text-leads".
  3. Direct Users to a Page After Signing Up: Decide where users should be redirected after registration. This could be a custom 'Thank You' page or any other URL on your website. Insert this URL in the value of the "route-to" input field.

Step 4: Whitelisting Your Domain

After integrating the form, please reach out to support@attractwell.com with the domain name where the form is hosted. This is a critical step to ensure your domain is whitelisted and that leads can be submitted without errors.

If you would like to make this request via XMLHttpRequest (also known as AJAX) and would prefer a JSON object as a response, change the route-to field to have a value of ajax when the request is submitted.