Formidable Forms
Formidable Forms is a powerful WordPress form builder focused on advanced forms, calculators, and application-style solutions. It renders standard HTML <form> elements in the page DOM, so AttributionHub’s standard forms handler detects and populates it automatically.
Add hidden fields to your form with the correct field names, and AttributionHub fills them with attribution data whenever a visitor loads the page.
Prerequisites
Before you begin, make sure:
- The AttributionHub tracking script is installed on your site (see Installation)
- You have Formidable Forms installed and activated in WordPress (Lite or Pro)
- You have access to the WordPress admin panel to edit forms
Step 1: Open Your Form
- In your WordPress admin, go to Formidable > Forms
- Click on the form you want to edit, or click Add New to create a new form
Step 2: Add Hidden Fields
- In the Formidable Forms builder, look for the Hidden field type in the field list on the left panel (under “Advanced Fields” or by searching)
- Drag the Hidden field into your form
- Repeat for each attribution field you want to capture
Step 3: Configure Each Hidden Field
For each hidden field you added:
- Click on the hidden field in the form editor to open its settings
- Set the Label to something descriptive (e.g., “Attribution Channel - Latest”)
- Open the Advanced tab
- In the Field Key field, enter the AttributionHub field name (e.g.,
ah_lt_channel) - Leave the Default Value empty
The Field Key in Formidable Forms determines the HTML name attribute for the hidden field. This is what AttributionHub uses to identify and populate the field.
Note: In Formidable’s free version, the field
nameattribute uses a pattern likeitem_meta[XX]. If you cannot set a custom field key, usefieldMappingto map AttributionHub paths to these names. See Custom Field Mapping.
Step 4: Save and Test
- Click Update to save your form
- Visit a page on your site that contains the form
- Open your browser’s DevTools (F12) and inspect the hidden
<input>elements — check that they have attribution values - Submit a test entry
- In WordPress admin, go to Formidable > Entries and find your test entry. The hidden field values should contain attribution data
For a full testing walkthrough, see Verify It Works.
Recommended Hidden Fields
The table below lists the most commonly used fields. For the complete field catalog, see Field Reference.
Core Attribution Fields (Latest Touch)
| Field Key | Description | Example Values |
|---|---|---|
ah_lt_channel | Channel group (latest touch) | Paid Search, Organic Social, Direct |
ah_lt_source | Traffic source name | Google, Facebook, Direct |
ah_lt_medium | Traffic medium | paid, organic, social, email |
ah_lt_campaign | Campaign name | spring_sale, Organic Search |
ah_lt_content | Content classification | Paid Search Ad, Social Post |
ah_lt_term | Search keyword (if available) | running shoes |
ah_lt_landing_url | Landing page URL (no query string) | https://yoursite.com/pricing |
Core Attribution Fields (First Touch)
| Field Key | Description | Example Values |
|---|---|---|
ah_ft_channel | Channel group (first touch) | Paid Search, Organic Social |
ah_ft_source | Traffic source name | Google, Facebook |
ah_ft_medium | Traffic medium | paid, organic, social |
ah_ft_campaign | Campaign name | launch_campaign |
ah_ft_landing_url | Original landing page URL | https://yoursite.com/blog/post |
Global Fields
| Field Key | Description | Example Values |
|---|---|---|
ah_visitor_id | Unique visitor ID, persistent across visits | a1b2c3d4-e5f6-7890-abcd-ef1234567890 |
ah_touch_count | Total number of recorded visits | 5 |
For additional fields including latest-non-direct touch (
ah_lnd_*), drill-down fields, raw UTM parameters, and ad click IDs, see the full Field Reference.
Custom Field Mapping
If Formidable uses auto-generated field names (like item_meta[XX]), map AttributionHub’s paths to those names:
<script>
window.attrhub = {
settings: {
fieldMapping: {
"latest.attribution.channelGroup": "item_meta[25]",
"latest.attribution.source": "item_meta[26]",
"latest.attribution.medium": "item_meta[27]",
"latest.attribution.campaign": "item_meta[28]",
"latest.attribution.landingPageUrl": "item_meta[29]",
"first.attribution.channelGroup": "item_meta[30]",
"first.attribution.source": "item_meta[31]",
visitorId: "item_meta[32]",
},
},
};
</script>Replace the field IDs (25, 26, etc.) with the actual values from your form. You can find them by inspecting the rendered form in DevTools.
See Configuration for the full mapping reference.
Tips
- Formidable Views — Formidable Pro’s Views feature lets you display submitted data on the front-end. You can build attribution reports directly in WordPress by creating a View that shows hidden field values.
- Formidable API — Formidable Pro includes a REST API. Hidden field values are included in the API response, making it easy to pull attribution data into external systems.
- Email notifications — Use shortcodes like
[field_key]in email notification templates to include attribution values. For example,[ah_lt_channel]in the notification body. - Formidable + WooCommerce — If you use Formidable with WooCommerce product forms, attribution data travels with the order, letting you track which marketing channels generate the most sales.
- Calculations and logic — Formidable’s advanced calculation and conditional logic features can reference hidden field values, though for attribution data this is rarely needed.
- Multi-page forms — Add hidden fields to the first page for immediate population.
Troubleshooting
Hidden fields are empty in entries
- Inspect the rendered form in DevTools and check the
nameattributes on hidden inputs. - If Formidable uses
item_meta[XX]naming, configurefieldMappingwith the correct IDs. - Make sure the field key matches the AttributionHub field name exactly (case-sensitive).
- Enable logging (
enableLogging: truein settings) and check the browser Console.
AJAX form submission
Formidable can submit forms via AJAX. AttributionHub populates hidden fields before submission, so AJAX submissions include the attribution data. If values are still missing, check that the hidden fields are within the <form> element scope.
Formidable Lite limitations
Formidable Lite’s hidden field support may differ from the Pro version. Inspect the rendered HTML to confirm hidden fields are rendering as expected. If the Lite version does not support hidden fields, consider adding them via a custom HTML field with <input type="hidden" name="ah_lt_channel" />.