Skip to Content
Field Reference

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:

PrefixTouch TypeDescription
ah_ft_First TouchFirst non-direct visit. Locked permanently once set.
ah_lt_Latest TouchMost recent visit of any type (including Direct).
ah_lnd_Latest Non-DirectMost 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 NameDescriptionExamples
{prefix}channelGA4 channel groupPaid Search, Organic Social, Direct
{prefix}sourceTraffic source nameGoogle, Facebook, Direct
{prefix}source_domainNormalized referrer hostnamegoogle.com, None
{prefix}source_platformAd platform or source typeGoogle Ads, Organic Search
{prefix}campaignCampaign namespring_sale, Organic Search
{prefix}mediumTraffic mediumpaid, organic, social, email, direct
{prefix}medium_detailMedium subtypesearch, display, video
{prefix}contentContent classificationPaid Search Ad, Social Post
{prefix}content_detailSpecific content infoshoes | banner1, /pricing
{prefix}termSearch keywordrunning shoes
{prefix}is_paidWhether traffic is paidtrue, false

Drill-Down Fields

These fields provide hierarchical attribution data (similar to PostHog):

Form Field NameDescriptionExamples
{prefix}drilldown1Level 1: Platform/SourceGoogle, Facebook
{prefix}drilldown2Level 2: Campaignspring_sale, Organic
{prefix}drilldown3Level 3: Content/Termbanner1, running shoes

Touch Metadata Fields

Form Field NameDescriptionExamples
{prefix}timestampWhen the touch occurred (ISO 8601)2025-12-15T10:30:00.000Z
{prefix}landing_urlLanding page URL (no query params)https://yoursite.com/pricing
{prefix}landing_url_fullFull landing URL with query and hashhttps://yoursite.com/pricing?ref=123
{prefix}referrer_urlReferrer URL (base, no query params)https://google.com/search
{prefix}landing_pathLanding page pathname only/pricing
{prefix}landing_page_groupFirst 2 path segments/blog/guides
{prefix}previous_page_urlInternal navigation source (lt/lnd only)https://yoursite.com/features

Raw UTM Parameters

Form Field NameDescription
{prefix}utm_sourceRaw utm_source parameter value
{prefix}utm_mediumRaw utm_medium parameter value
{prefix}utm_campaignRaw utm_campaign parameter value
{prefix}utm_contentRaw utm_content parameter value
{prefix}utm_termRaw utm_term parameter value

Ad Click ID Fields

Form Field NameDescription
{prefix}gclidGoogle Ads click ID
{prefix}msclkidMicrosoft Ads click ID
{prefix}fbclidMeta (Facebook/Instagram) click ID
{prefix}gbraidGoogle Ads privacy-safe click ID (web-to-app)
{prefix}wbraidGoogle Ads privacy-safe click ID (app-to-web)
{prefix}ttclidTikTok Ads click ID
{prefix}li_fat_idLinkedIn Ads click ID
{prefix}twclidTwitter/X Ads click ID
{prefix}snapclidSnapchat Ads click ID
{prefix}utm_idGeneric campaign ID
{prefix}click_id_typeType of the first recognized click ID
{prefix}click_id_valueValue of the first recognized click ID

Global Fields

These fields are not scoped to a specific touch type:

Form Field NameDescription
ah_visitor_idUnique visitor UUID, persistent across visits
ah_touch_countTotal number of recorded visits

Conversion Fields

Captured automatically when a form is submitted:

Form Field NameDescription
ah_conv_timestampWhen the conversion occurred
ah_conv_urlThe URL where the form was submitted
ah_conv_pathThe path of the conversion page
ah_conv_event_nameForm identifier or event name
ah_conv_target_idForm element ID
ah_conv_days_to_convertDays 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_tier
  • ah_ft_custom_referral_code, ah_lt_custom_referral_code, ah_lnd_custom_referral_code

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" />