jpskill.com
💼 ビジネス コミュニティ

form-attribution

ウェブサイトでUTMパラメーターや広告クリックIDなどを自動取得し、マーケティング効果測定を最適化するSkill。

📜 元の英語説明(参考)

Implement the Form Attribution library on websites to capture UTM parameters, ad click IDs, referrer data, and other marketing attribution automatically. Use when the user needs to (1) add marketing attribution tracking to a website, (2) configure form attribution for specific use cases like cross-subdomain tracking or CRM integration, (3) troubleshoot form attribution issues, or (4) implement platform-specific patterns for Webflow, HubSpot, WordPress, or other select platforms.

🇯🇵 日本人クリエイター向け解説

一言でいうと

ウェブサイトでUTMパラメーターや広告クリックIDなどを自動取得し、マーケティング効果測定を最適化するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o form-attribution.zip https://jpskill.com/download/6540.zip && unzip -o form-attribution.zip && rm form-attribution.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/6540.zip -OutFile "$d\form-attribution.zip"; Expand-Archive "$d\form-attribution.zip" -DestinationPath $d -Force; ri "$d\form-attribution.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して form-attribution.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → form-attribution フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

フォームアトリビューション

マーケティングアトリビューションデータを自動的に取得し、隠しフィールドとしてフォームに挿入する、軽量で依存関係のないスクリプトです。

リソース リンク/URL
CDN URL https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js
ドキュメント https://form-attribution.flashbrew.digital/docs
GitHub https://github.com/Flash-Brew-Digital/form-attribution

基本的な実装

終了タグ </body> の前に以下を追加してください。

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js" defer></script>

このスクリプトは、UTMパラメーターを自動的に取得し、sessionStorageに保存し、すべてのフォームに隠しフィールドを挿入します。

設定オプション

スクリプトタグのdata属性を介して設定します。

属性 デフォルト 説明
data-storage sessionStorage sessionStoragelocalStorage、または cookie
data-field-prefix "" 隠しフィールド名のプレフィックス (例: attr_)
data-extra-params "" 取得する追加のURLパラメーター (カンマ区切り)
data-exclude-forms "" 除外するフォームのCSSセレクター
data-click-ids false 広告プラットフォームのクリックID (gclid, fbclidなど) を取得する
data-debug false デバッグパネルオーバーレイを有効にする
data-privacy true GPC/DNTプライバシーシグナルを尊重する
data-storage-key form_attribution_data カスタムストレージキー名

Cookie固有のオプション (data-storage="cookie"の場合):

属性 デフォルト 説明
data-cookie-domain "" Cookieドメイン (例: .example.com)
data-cookie-path / Cookieパス
data-cookie-expires 30 有効期限 (日数)
data-cookie-samesite lax laxstrict、または none

取得されるもの

URLパラメーター (デフォルト): utm_sourceutm_mediumutm_campaignutm_termutm_contentutm_idref

メタデータ (自動): landing_pagecurrent_pagereferrer_urlfirst_touch_timestamp

クリックID (data-click-ids="true"の場合): gclid (Google)、fbclid (Meta)、msclkid (Microsoft)、ttclid (TikTok)、li_fat_id (LinkedIn)、twclid (Twitter/X)

一般的な設定

広告クリックIDトラッキングあり:

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-click-ids="true" defer></script>

クロスサブドメイン追跡 (Cookie):

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-storage="cookie"
  data-cookie-domain=".example.com"
  data-cookie-expires="90"
  data-click-ids="true" defer></script>

CRMフィールドプレフィックス:

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-field-prefix="lead_"
  data-click-ids="true" defer></script>

フォームを除外 (例: 検索、ログイン):

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-exclude-forms=".no-track, #login-form, [data-no-attribution]" defer></script>

JavaScript API

このライブラリはグローバルな FormAttribution オブジェクトを公開しています。

FormAttribution.getData();              // 取得したすべてのデータを取得
FormAttribution.getParam('utm_source'); // 特定のパラメーターを取得
FormAttribution.getForms();             // 追跡対象のフォームを取得
FormAttribution.clear();                // 保存されたデータをクリア
FormAttribution.refresh();              // フォームに再挿入

プライバシー

Global Privacy Control (GPC) および Do Not Track (DNT) をデフォルトで尊重します。これらが検出された場合、データは取得されません。data-privacy="false"で上書きできます。

参照 (references/*)

プラットフォーム固有のパターン

Webflow、HubSpot、WordPress、Marketo、およびその他の特定のプラットフォームに固有の実装パターンについては、references/platforms.md を参照してください。

FAQ

互換性、プライバシー、パフォーマンス、カスタマイズに関するよくある質問については、references/faq.md を参照してください。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Form Attribution

A lightweight, zero-dependency script that automatically captures marketing attribution data and injects it into forms as hidden fields.

Resource Link/URL
CDN URL https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js
Docs https://form-attribution.flashbrew.digital/docs
GitHub https://github.com/Flash-Brew-Digital/form-attribution

Basic Implementation

Add before the closing </body> tag:

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js" defer></script>

The script automatically captures UTM parameters, stores them in sessionStorage, and injects hidden fields into all forms.

Configuration Options

Configure via data attributes on the script tag:

Attribute Default Description
data-storage sessionStorage sessionStorage, localStorage, or cookie
data-field-prefix "" Prefix for hidden field names (e.g., attr_)
data-extra-params "" Additional URL parameters to capture (comma-separated)
data-exclude-forms "" CSS selector for forms to exclude
data-click-ids false Capture ad platform click IDs (gclid, fbclid, etc.)
data-debug false Enable debug panel overlay
data-privacy true Respect GPC/DNT privacy signals
data-storage-key form_attribution_data Custom storage key name

Cookie-specific options (when data-storage="cookie"):

Attribute Default Description
data-cookie-domain "" Cookie domain (e.g., .example.com)
data-cookie-path / Cookie path
data-cookie-expires 30 Expiration in days
data-cookie-samesite lax lax, strict, or none

What Gets Captured

URL Parameters (default): utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id, ref

Metadata (automatic): landing_page, current_page, referrer_url, first_touch_timestamp

Click IDs (when data-click-ids="true"): gclid (Google), fbclid (Meta), msclkid (Microsoft), ttclid (TikTok), li_fat_id (LinkedIn), twclid (Twitter/X)

Common Configurations

With ad click ID tracking:

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-click-ids="true" defer></script>

Cross-subdomain tracking (cookies):

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-storage="cookie"
  data-cookie-domain=".example.com"
  data-cookie-expires="90"
  data-click-ids="true" defer></script>

CRM field prefix:

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-field-prefix="lead_"
  data-click-ids="true" defer></script>

Exclude forms (e.g., search, login):

<script src="https://cdn.jsdelivr.net/npm/form-attribution@latest/dist/script.min.js"
  data-exclude-forms=".no-track, #login-form, [data-no-attribution]" defer></script>

JavaScript API

The library exposes a global FormAttribution object:

FormAttribution.getData();              // Get all captured data
FormAttribution.getParam('utm_source'); // Get specific parameter
FormAttribution.getForms();             // Get tracked forms
FormAttribution.clear();                // Clear stored data
FormAttribution.refresh();              // Re-inject into forms

Privacy

Respects Global Privacy Control (GPC) and Do Not Track (DNT) by default. When detected, no data is captured. Override with data-privacy="false".

References (references/*)

Platform-Specific Patterns

For implementation patterns specific to Webflow, HubSpot, WordPress, Marketo, and certain other platforms, see references/platforms.md.

FAQ

For common questions about compatibility, privacy, performance, and customization, see references/faq.md.