Calculator analytics and CRM

Calculator UTM and Hidden-Field Attribution Contract

Capture campaign context once, preserve first-touch and last-touch values deliberately, and deliver a minimal, reproducible attribution payload without turning hidden fields into consent.

Direct answer

Capture allowlisted campaign parameters when a visitor enters from outside the calculator, attach a timestamp and parser version, and preserve the first-touch record across blank internal steps. Keep a separate last-touch record for a later external entry. Deliver only purpose-specific fields to analytics or CRM, keep consent separate, and reuse the same normalized payload and idempotency key on retries.

Definition

A calculator attribution contract defines which entry parameters are accepted, when they are captured, whether first-touch and last-touch values coexist, how values are normalized, how long they persist and which downstream systems receive them. Hidden fields transport context; they do not make that context accurate, causal or permitted.

Key findings

Verified 22 November 2026

  • Capture allowlisted campaign parameters on the external entry, with a timestamp and parser version. Do not let blank internal steps erase a known first touch.
  • Store first touch and last touch as separate records. A later external entry may update last touch under a declared policy without rewriting the acquisition record.
  • Consent or another applicable purpose remains a separate decision. The presence of a UTM parameter or hidden field does not authorize analytics, CRM or marketing use.
  • A CRM retry must reuse the same normalized attribution payload and idempotency key so a network failure cannot create a different acquisition story or duplicate contact event.

What is a calculator attribution contract?

A calculator attribution contract is the versioned rule that turns entry context into a reproducible record. It names accepted parameters, capture events, normalization, first-touch and last-touch behavior, persistence, recipients and deletion conditions. Without that contract, a hidden field can silently change meaning between the landing page, calculator, CRM and report.

Google Analytics documents manual campaign parameters in destination URLs and maps them to traffic-source dimensions. A calculator's own record can use those parameter names, but it is not a reproduction of Google Analytics attribution. Identity, session, consent, lookback and processing rules can differ.

A hidden field is only a transport mechanism. It is not evidence that the value is accurate, that a campaign caused the result or that the visitor permitted optional analytics or marketing.

Sources: Google Analytics URL builder; Google Analytics traffic-source dimensions

What is the minimum useful field contract?

Collect the smallest set that answers a declared measurement or operational purpose. Keep campaign labels, capture provenance, calculator identity and permission state in distinct groups so downstream systems do not infer one from another.

CALCULATOR-UTM-ATTRIBUTION-FIXTURES

Minimal calculator attribution field contract
GroupFieldsContract rule
Campaignsource, medium, campaign, campaign IDAllowlist names and cap each value
Optional detailterm, contentCollect only when the reporting purpose needs them
Provenanceentry URL, captured_at, parser_version, capture_eventExplain where and when the record came from
Calculatorcalculator_id, formula_version, completion_id, result_idKeep acquisition context separate from the calculation
Permissionanalytics consent, contact purpose, marketing preferenceDo not infer permission from campaign fields

How should first touch and last touch behave?

First touch preserves the first accepted external entry under the contract. Last touch records the most recent accepted external entry. Internal calculator steps are neither: they inherit the known context and do not manufacture a new campaign.

First-touch and last-touch decision table
EventFirst touchLast touch
First external entry with accepted parametersCreateCreate
Internal step with no parametersPreservePreserve
Later external entry with accepted parametersPreserveReplace under the declared policy
Blank or rejected parameterDo not eraseDo not erase
Consent withdrawalRetain or delete only under the stated retention purposeStop optional downstream use

Worked example: a three-step solar quote calculator

A visitor enters a fictional solar quote calculator with source=google, medium=cpc and campaign=solar-quote. The parser accepts those values, records the landing URL, captured time and parser version, then stores one first-touch and one last-touch record.

The visitor completes three internal steps whose URLs contain no campaign parameters. Those blank steps preserve both records. When the visitor submits a contact request, the CRM payload includes only the accepted campaign fields, calculator ID, formula version, result ID, contact purpose and capture provenance required for the workflow.

If the CRM request times out, the retry reuses the same completion ID, normalized attribution payload and idempotency key. It does not recapture the current blank URL or create a second attribution record.

What did the twelve attribution fixtures test?

Twelve executed deterministic fixtures returned the documented decisions on 22 November 2026. They test the reference state rules and parser decisions, not a named analytics property, calculator platform or CRM.

Twelve executed deterministic fixtures
IDEventExpected decision
A01First external entry with source, medium and campaignCapture original values, time and parser version
A02Internal next step with no campaign parametersPreserve both known records
A03Later external entry with new parametersPreserve first touch and update last touch
A04Blank parameter valueDo not erase a known value
A05Duplicate parameter nameReject the ambiguous input
A06Mixed-case keyNormalize the key and preserve value case
A07Value above the published length capReject and flag
A08Control character in a valueReject
A09Email-shaped campaign valueExclude from analytics and flag for review
A10Consent withdrawalBlock the optional analytics payload
A11Anonymous calculationCreate no CRM contact payload
A12CRM retryReuse the same payload and idempotency key

How should campaign values be validated and minimized?

Apply an allowlist of parameter names, a value-length cap, character rules and one duplicate-parameter policy before data reaches analytics or CRM. OWASP recommends allowlisting expected input and validating length and syntax. Validate the decoded representation so encoded control characters do not bypass the contract.

Keep suspected personal data, secrets and credentials out of URLs. The reference fixture flags an email-shaped campaign value, but that small pattern is not a complete personal-data detector. Operational review and upstream campaign controls are still necessary.

ICO data-minimisation guidance says personal data should be adequate, relevant and limited to what is necessary. Its page is under review following the Data (Use and Access) Act, so teams subject to UK law should recheck the current guidance and their own legal basis before launch.

Sources: OWASP input validation; ICO data minimisation

Why can the CRM and Google Analytics disagree?

A CRM usually records a known contact or submission under the site's field contract. Google Analytics reports users, sessions and traffic-source dimensions under its own collection and attribution rules. Consent state, identifiers, redirects, stripped parameters, integration failures, processing and cross-device behavior can all create different counts or labels.

Treat the two records as related evidence, not interchangeable truth. Reconcile a specific completion ID, capture time, landing URL and campaign payload where the systems permit it. Do not overwrite one system simply to make a dashboard match.

Sources: Google Analytics manual and automatic tagging

Calculator attribution release checklist

Release only when capture, persistence, permission and delivery follow one versioned contract.

  • Publish the accepted parameter names, case rule, length cap and duplicate policy.
  • Capture an external entry event, timestamp and parser version.
  • Keep first-touch and last-touch records separate.
  • Make blank internal steps preserve known values.
  • Keep campaign data, calculator results and permission fields distinct.
  • Deliver only the fields required for each analytics or CRM purpose.
  • Reuse the same payload and idempotency key on retries.
  • Test rejection, withdrawal, anonymous use and downstream failure before launch.

Verification and correction path

The five primary sources and all twelve deterministic fixtures were checked on 22 November 2026. A correction report should remove secrets and include the entry URL, exact parameter order, capture event, parser version, first-touch and last-touch state, consent state, completion ID, intended recipients and expected CRM fields.

Method and evidence

Evidence type: Minimal attribution field contract, first-touch and last-touch decision table, worked journey and twelve executed deterministic fixtures

  1. Defined an allowlist for campaign fields, provenance fields, calculator identity and permission state before parsing a landing URL.
  2. Kept first-touch and last-touch values separate, preserved known values across blank internal steps and versioned the parser that produced each accepted record.
  3. Executed twelve deterministic fixtures covering capture, preservation, later entries, duplicate parameters, case, length, control characters, suspected personal data, consent withdrawal, anonymous use and idempotent CRM retries.
  4. Rechecked current Google Analytics campaign documentation, ICO data-minimisation guidance and OWASP input-validation guidance on 22 November 2026.

Topic score: 4.51 / 5. Business fit 4.7, verified demand 4.3, distinct intent 4.6, original evidence 4.7, citation usefulness 4.5, feasibility 4.4.

Primary sources

Limitations

  • This is an editorial implementation reference, not legal advice or a Google Analytics configuration. It does not reproduce GA4 attribution processing.
  • The fixtures ran in Node against the published reference rules. No browser, ad platform, Google Analytics property, tag manager, consent-management platform, named calculator builder or CRM was tested.
  • The email-shape fixture is not a complete personal-data detector. Referrers can be absent, parameters can be stripped and browser measurement limits can change available context.
  • Cross-device identity, offline conversion import, ad-platform click IDs and jurisdiction-specific retention are outside the executed fixtures.
  • UTM values are self-declared labels. They do not prove causation, conversion lift or marketing effectiveness.

Verification and corrections

Google Analytics campaign documentation, ICO data-minimisation guidance, OWASP input-validation guidance and twelve deterministic fixtures verified 22 November 2026.

Recommended retest: Recheck after any campaign-field, parser, consent, persistence, analytics, CRM, retry or retention change.

Found an error or a changed standard? Use the correction process and include the page URL and primary evidence.

Next step

Apply the evidence to your next release

Use the published method, keep a dated test record and revisit the result after the calculator or its operating rules change.

Open the testing protocol