form-attribution_skill

This skill helps implement form attribution to auto-capture utm and click IDs and inject hidden fields for marketing analytics.
  • Python

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill 224-industries/224-agent-skills --skill form-attribution

  • SKILL.md4.9 KB

Overview

This skill implements the Form Attribution library on websites to automatically capture UTM parameters, ad click IDs, referrer data, and other marketing attribution details and inject them into form submissions. It simplifies cross-subdomain tracking, CRM field mapping, and platform-specific implementations for Webflow, HubSpot, WordPress, and similar systems. The setup is lightweight and zero-dependency, delivered via CDN and configurable through data attributes.

How this skill works

The script reads URL parameters and page metadata, stores attribution data in sessionStorage, localStorage, or cookies, and inserts hidden fields into tracked forms. It can capture UTM parameters, click IDs (gclid, fbclid, msclkid, etc.), landing/current pages, the referrer URL, and first-touch timestamps. Configuration is handled via data attributes on the script tag and a small JavaScript API provides inspection and control (getData, getParam, getForms, clear, refresh).

When to use it

  • Add automated marketing attribution to any site with HTML forms.
  • Track multi-step flows or cross-subdomain user journeys.
  • Populate CRM lead fields with consistent attribution values.
  • Add ad platform click IDs to form submissions for offline conversion tracking.
  • Troubleshoot missing or inconsistent attribution in form data.

Best practices

  • Place the script before </body> and use defer to avoid blocking rendering.
  • Choose storage based on needs: sessionStorage for single sessions, cookies for cross-subdomain persistence.
  • Use a field prefix when mapping to CRM fields to avoid collisions (e.g., lead_).
  • Exclude non-conversion forms (search, login) via data-exclude-forms selectors.
  • Enable click ID capture only if you plan to use offline conversion or ad platform matching.

Example use cases

  • Basic site: include CDN script to capture UTM tags and inject hidden fields into all forms.
  • Cross-subdomain tracking: set data-storage="cookie" and data-cookie-domain to persist first-touch across domains.
  • CRM integration: set data-field-prefix to match your CRM lead field names and capture click IDs for ad platforms.
  • Platform pattern: add the script and exclusions for Webflow forms or HubSpot embedded forms to avoid double tracking.
  • Debugging: enable data-debug to show the overlay and validate which values are captured and injected.

FAQ

Yes. By default it respects GPC and DNT and will not capture data when those signals are present; you can override with data-privacy="false" if you have a compliant reason.

How do I capture extra URL parameters beyond standard UTMs?

Use data-extra-params with a comma-separated list of parameter names. The script will capture those in addition to the default set.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational