Documentation
WordPress Plugin Setup Guide
The LeadMachine WordPress Connector plugin connects your WordPress website to LeadMachine with three powerful features:
- Lead Capture Forms - Built-in forms and Gravity Forms integration to capture leads
- Blog Post Sync - Automatically sync blog posts for AI-powered email newsletters
- Auto-Sync on Publish - New posts automatically sync when published
Prerequisites
- Active LeadMachine account
- WordPress website (version 5.0 or higher)
- Administrator access to your WordPress site
- Your LeadMachine Company ID
- Your LeadMachine API Key (generated in Company Settings)
Step 1: Get Your Credentials
Finding Your Company ID
- Log in to your LeadMachine dashboard
- Navigate to Company from the sidebar
- Your Company ID is displayed at the top of the page
- Copy this ID
Generating Your API Key
- In Company Settings, scroll to WordPress Integration
- Click the Generate button
- Copy the API key that appears
- Keep this key secure - you'll need it during plugin setup
Important: The API key is required for security. Without it, form submissions will be rejected.
Step 2: Download the Plugin
- Visit the WordPress Plugin Download Page
- If you're logged in, click Download Plugin
- If not logged in, fill out the form to receive a download link by email
- Download the
leadmachine-connector.zipfile
Step 3: Install in WordPress
- Log in to your WordPress admin panel
- Navigate to Plugins > Add New
- Click Upload Plugin at the top
- Click Choose File and select
leadmachine-connector.zip - Click Install Now
- Click Activate Plugin
Step 4: Configure the Plugin
After activation, you'll find LeadMachine in your WordPress admin menu.
Connection Tab
- Enter your Company ID
- Enter your API Key
- Leave the API URL as default (https://app.leadmachine.fyi)
- Click Save Settings
Form Styling Tab (Optional)
Customize the built-in LeadMachine form:
- Form Title
- Form Description
- Button Text and Color
- Background and Label Colors
- Success Message
Using the Built-in Form
Add the LeadMachine form to any page or post using the shortcode:
[leadmachine_form]
Shortcode Options
Custom title and description:
[leadmachine_form title="Contact Us" description="We'd love to hear from you!"]
Apply tags to leads:
[leadmachine_form tags="Newsletter,Website"]
Custom button:
[leadmachine_form button_text="Send Message" button_color="#667eea"]
Gravity Forms Integration
If you use Gravity Forms, you can automatically send submissions to LeadMachine.
Enabling Gravity Forms
- Go to LeadMachine > Gravity Forms tab
- Check Enable Integration
- Set Default Tags (optional) - applied to all GF submissions
Mapping Form Fields
For each Gravity Form:
- Check the box next to the form name to enable it
- Map your form fields to LeadMachine fields:
- Add form-specific tags (optional)
- Click Save Settings
Testing
Submit a test entry on your Gravity Form. Within seconds, check your LeadMachine leads - you should see the new lead with source "Gravity Forms: [Form Name]".
Conversion & ROAS Tracking (Google Ads + GA4)
Fire a Google Ads conversion - and optionally a GA4 purchase event with real revenue - when a form is completed. This works with the built-in LeadMachine forms and with connected Gravity Forms, including Gravity Forms + Stripe checkout. All values are dynamic; nothing is hard-coded.
Settings (LeadMachine > Google Ads tab)
- Conversion ID - your Google Ads conversion ID, e.g.
AW-123456789(Google Ads > Goals > Conversions > Tag setup). The globalgtag.jstag for this account must be installed on your site (via your Google tag, Google Site Kit, or a header/footer snippet). - Conversion Label - the conversion action's label (the part after the slash in the tag setup). Optional.
- Send GA4 purchase event - also fires a GA4
purchaseevent with the transaction value + currency, for revenue / ROAS reporting. - Confirmation page - optional but recommended for payment forms. If set, the conversion fires only when the visitor lands on a page whose URL contains this text (e.g.
payment-success), so abandoned checkouts are never counted.
Where the value comes from (never hard-coded)
- In-form payment (Gravity Forms Stripe/PayPal add-on): the amount + currency are read automatically from the entry.
- Hosted / off-site Stripe checkout: pass the amount on the confirmation redirect's query string - add
value={total}¤cy=USD(use the merge-tag picker for the total/price). The keys must be exactlyvalueandcurrency.
Gravity Forms + Stripe hosted checkout - step by step
- In LeadMachine > Google Ads: enter your Conversion ID and Label, tick Send GA4 purchase event, and set Confirmation page to your Stripe success page slug (e.g.
payment-success). - In the Gravity Form's Confirmation (Page Redirect), enable Pass Field Data via Query String and include:
value={your price merge tag}¤cy=USD
Use the merge-tag picker to insert the price/total for value; currency is a static value (change USD if you bill another currency). You don't need to pass anything else - the plugin adds the transaction ID automatically.
- Ensure the global Google tag (
gtag.js) for your Ads account is installed site-wide.
On a completed purchase the plugin fires the Google Ads conversion and (if enabled) a GA4 purchase, both carrying the value + currency, and only on the confirmation page - so abandoned checkouts are excluded.
Verify
Run a test purchase and open Google Tag Assistant or GA4 DebugView on the confirmation page - you should see conversion and purchase events with value and currency populated. (Requires plugin v2.7.5 or newer.)
Blog Post Sync for Email Newsletters
New in v2.3.0 - Turn your WordPress blog into an automated email newsletter! Sync your blog posts to LeadMachine and let Ledo AI create engaging email summaries that drive traffic back to your site.
Why Use Blog Post Sync?
- Automated Content - No need to manually write newsletter emails
- AI-Powered Summaries - Ledo creates engaging email content from your posts
- Sequential Delivery - Posts sent oldest-to-newest, perfect for evergreen content
- Drive Traffic - Each email links back to the full article on your site
- Category Targeting - Choose which blog categories to include
Setting Up Post Sync in WordPress
- Go to LeadMachine > Post Sync tab in your WordPress admin
- Toggle Enable Post Sync to ON
- Select which Categories to sync (check the boxes for each category you want)
- Click Sync Categories to send category data to LeadMachine
- Click Sync All Posts Now to sync your existing posts
Tip: You'll see a count of synced posts and the last sync time in the Post Sync tab.
Auto-Sync on Publish
Once enabled, new posts are automatically synced to LeadMachine when you publish them. No manual action required - just keep blogging!
What Gets Synced
| WordPress Data | Used In Email As |
| ---------------- | ------------------ |
| Post Title | Subject line and headline |
| Post Content | AI-summarized body content |
| Featured Image | Header image in email |
| Permalink | "Read Full Article" button |
| Categories | Campaign filtering |
| Publish Date | Sequential ordering (oldest first) |
| Form Field | LeadMachine Field |
| ------------ | ------------------- |
| First Name | First Name |
| Last Name | Last Name |
| Email (primary contact) | |
| Phone | Phone (contact) |
| Company | Company Name |
| Message | Lead Notes |
Additional fields are recorded in the lead notes for reference.
Troubleshooting
"API key is required" Error
Your WordPress plugin needs the API key from Company Settings.
- Go to LeadMachine > Company Settings > WordPress Integration
- Generate an API key if you haven't already
- Copy and paste it into your WordPress plugin settings
"Invalid API key" Error
The API key doesn't match what's in your LeadMachine account.
- Regenerate the API key in Company Settings
- Update the key in your WordPress plugin settings
- Save settings and try again
Forms Not Syncing
- Verify Company ID and API Key are correct
- Check that your WordPress site can make HTTPS requests
- For Gravity Forms, ensure the form is enabled in the mapping settings
- Check WordPress error logs for details
Gravity Forms Not Appearing
- Ensure Gravity Forms plugin is installed and activated
- Create at least one form in Gravity Forms first
- Refresh the LeadMachine settings page
Updating the Plugin
When a new version is available:
- Download the latest
leadmachine-connector.zip - Deactivate the current plugin
- Delete the old plugin
- Upload and activate the new version
- Your settings will be preserved
Getting Help
If you encounter issues:
- Email: [email protected]
- Include your Company ID and WordPress version
- Describe the issue and any error messages
Last Updated: July 2026