Field Reference
AttributionHub captures and stores over 130 fields across three touch types, plus conversion and global metadata. This page documents every field available for form population.
Touch Types
Every attribution field is stored with three prefixes, representing three different attribution perspectives:
| Prefix | Touch Type | Description |
|---|---|---|
ah_ft_ | First Touch | First non-direct visit. Locked permanently once set. |
ah_lt_ | Latest Touch | Most recent visit of any type (including Direct). |
ah_lnd_ | Latest Non-Direct | Most recent non-direct visit. Preserved across direct revisits. |
For example, the channel field exists as ah_ft_channel, ah_lt_channel, and ah_lnd_channel.
GA4-like Attribution Fields
These fields follow Google Analytics 4 naming conventions. Replace {prefix} with ah_ft_, ah_lt_, or ah_lnd_:
| Form Field Name | Description | Examples |
|---|---|---|
{prefix}channel | GA4 channel group | Paid Search, Organic Social, Direct |
{prefix}source | Traffic source name | Google, Facebook, Direct |
{prefix}source_domain | Normalized referrer hostname | google.com, None |
{prefix}source_platform | Ad platform or source type | Google Ads, Organic Search |
{prefix}campaign | Campaign name | spring_sale, Organic Search |
{prefix}medium | Traffic medium | paid, organic, social, email, direct |
{prefix}medium_detail | Medium subtype | search, display, video |
{prefix}content | Content classification | Paid Search Ad, Social Post |
{prefix}content_detail | Specific content info | shoes | banner1, /pricing |
{prefix}term | Search keyword | running shoes |
{prefix}is_paid | Whether traffic is paid | true, false |
Drill-Down Fields
These fields provide hierarchical attribution data (similar to PostHog):
| Form Field Name | Description | Examples |
|---|---|---|
{prefix}drilldown1 | Level 1: Platform/Source | Google, Facebook |
{prefix}drilldown2 | Level 2: Campaign | spring_sale, Organic |
{prefix}drilldown3 | Level 3: Content/Term | banner1, running shoes |
Touch Metadata Fields
| Form Field Name | Description | Examples |
|---|---|---|
{prefix}timestamp | When the touch occurred (ISO 8601) | 2025-12-15T10:30:00.000Z |
{prefix}landing_url | Landing page URL (no query params) | https://yoursite.com/pricing |
{prefix}landing_url_full | Full landing URL with query and hash | https://yoursite.com/pricing?ref=123 |
{prefix}referrer_url | Referrer URL (base, no query params) | https://google.com/search |
{prefix}landing_path | Landing page pathname only | /pricing |
{prefix}landing_page_group | First 2 path segments | /blog/guides |
{prefix}previous_page_url | Internal navigation source (lt/lnd only) | https://yoursite.com/features |
Raw UTM Parameters
| Form Field Name | Description |
|---|---|
{prefix}utm_source | Raw utm_source parameter value |
{prefix}utm_medium | Raw utm_medium parameter value |
{prefix}utm_campaign | Raw utm_campaign parameter value |
{prefix}utm_content | Raw utm_content parameter value |
{prefix}utm_term | Raw utm_term parameter value |
Ad Click ID Fields
| Form Field Name | Description |
|---|---|
{prefix}gclid | Google Ads click ID |
{prefix}msclkid | Microsoft Ads click ID |
{prefix}fbclid | Meta (Facebook/Instagram) click ID |
{prefix}gbraid | Google Ads privacy-safe click ID (web-to-app) |
{prefix}wbraid | Google Ads privacy-safe click ID (app-to-web) |
{prefix}ttclid | TikTok Ads click ID |
{prefix}li_fat_id | LinkedIn Ads click ID |
{prefix}twclid | Twitter/X Ads click ID |
{prefix}snapclid | Snapchat Ads click ID |
{prefix}utm_id | Generic campaign ID |
{prefix}click_id_type | Type of the first recognized click ID |
{prefix}click_id_value | Value of the first recognized click ID |
Global Fields
These fields are not scoped to a specific touch type:
| Form Field Name | Description |
|---|---|
ah_visitor_id | Unique visitor UUID, persistent across visits |
ah_touch_count | Total number of recorded visits |
Conversion Fields
Captured automatically when a form is submitted:
| Form Field Name | Description |
|---|---|
ah_conv_timestamp | When the conversion occurred |
ah_conv_url | The URL where the form was submitted |
ah_conv_path | The path of the conversion page |
ah_conv_event_name | Form identifier or event name |
ah_conv_target_id | Form element ID |
ah_conv_days_to_convert | Days between first visit and conversion |
Custom Fields
If you configure custom fields via settings.customFields, they are stored with all three touch prefixes:
window.attrhub = {
settings: {
customFields: ["product_tier", "referral_code"],
},
};This creates:
ah_ft_custom_product_tier,ah_lt_custom_product_tier,ah_lnd_custom_product_tierah_ft_custom_referral_code,ah_lt_custom_referral_code,ah_lnd_custom_referral_code
Recommended Minimum Fields
If you can only add a few fields to your forms, we recommend these for the most actionable attribution data:
<!-- Latest touch (most recent visit) -->
<input type="hidden" name="ah_lt_channel" />
<input type="hidden" name="ah_lt_source" />
<input type="hidden" name="ah_lt_campaign" />
<input type="hidden" name="ah_lt_landing_url" />
<!-- First touch (how they originally found you) -->
<input type="hidden" name="ah_ft_channel" />
<input type="hidden" name="ah_ft_source" />
<input type="hidden" name="ah_ft_campaign" />
<!-- Visitor ID for deduplication -->
<input type="hidden" name="ah_visitor_id" />