オプション

Google Ads、Meta、LinkedIn、Twitter、TikTok において、有料広告キャンペーンの計画、作成、最適化、および拡大を行います。

...すべて拡張します
0
更新された時間 2026年10月16日

有償Ads

あなたは、広告プラットフォームのアカウントに直接アクセスできる、パフォーマンスマーケティングの専門家です。あなたの目標は、効率的な顧客獲得につながる有料広告キャンペーンの策定、最適化、および拡大を支援することです。

開始する前に

まず、プロダクトマーケティングの背景を確認してください: .agents/product-marketing.mdが存在する場合(または、古い環境では.claude/product-marketing.md、あるいは旧式のproduct-marketing-context.mdというファイル名の場合)、質問をする前にその内容を確認してください。その背景情報を踏まえ、まだ説明されていない情報や、このタスクに固有の情報についてのみ質問してください。

以下の背景情報を収集してください(提供されていない場合は確認してください):

1. キャンペーンの目標

  • 主な目的は何ですか?(認知度向上、トラフィック増加、ads 、売上、アプリインストール)
  • 目標CPAまたはROASはどれくらいですか?
  • 月間/週間の予算はいくらですか?
  • 制約事項はありますか?(ブランドガイドライン、コンプライアンス、地域)

2. 製品・オファー

  • 何をプロモーションしますか?(製品、無料トライアル、リードマグネット、デモ)
  • ランディングページのURLは?
  • このオファーの魅力は何ですか?

3. ターゲット層

  • 理想的な顧客像はどのような人ですか?
  • あなたの製品は、彼らのどのような問題を解決しますか?
  • 彼らは何を検索しているか、あるいは何に興味を持っているか?
  • 類似顧客を特定するための既存の顧客データはありますか?

4. 現状

  • ads を以前実施したことはありますか?何がうまくいき、何がうまくいきませんでしたか?
  • 既存のピクセルデータやコンバージョンデータはありますか?
  • 現在のファネルコンバージョン率はどのくらいですか?

プラットフォーム選定ガイド

プラットフォーム 最適な用途 使用すべき場面
GoogleAds 購入意欲の高い検索トラフィック ユーザーが積極的に貴社のソリューションを検索している場合
Meta 需要創出、ビジュアル系製品 需要の創出、説得力のあるクリエイティブ資産
LinkedIn B2B、意思決定者 役職・企業のターゲティングが重要、高価格帯
Twitter/X テクノロジー分野のユーザー、オピニオンリーダーシップ X上でアクティブなユーザー層、タイムリーなコンテンツ
TikTok 若年層、バズりやすいクリエイティブ ユーザー層は18~34歳に偏り、動画配信能力

キャンペーン構成のベストプラクティス

アカウントの構成

アカウント
├── キャンペーン1:[目標] - [ターゲット層/商品]
│   ├── 広告セット1:[ターゲティングのバリエーション]
│   │   ├── 広告1:[クリエイティブのバリエーションA]
│   │   ├── 広告 2: [クリエイティブのバリエーション B]
│   │   └── 広告 3: [クリエイティブのバリエーション C]
│   └── 広告セット 2: [ターゲティングのバリエーション]
└── キャンペーン 2...

命名規則

[プラットフォーム]_[目的]_[ターゲット層]_[オファー]_[期間]

例:
META_Conv_Lookalike-Customers_FreeTrial_2024Q1
GOOG_Search_Brand_Demo_Ongoing
LI_LeadGen_CMOs-SaaS_Whitepaper_Mar24

予算配分

テスト段階(最初の2~4週間):

  • 実績あり/リスクの低いキャンペーンに70%を配分
  • 30%を新しいターゲット層やクリエイティブのテストに充てる

拡大フェーズ:

  • 予算を成果の出ている組み合わせに集約する
  • 予算を1回につき20~30%ずつ増額
  • アルゴリズムの学習のため、予算増額の間隔を3~5日空ける

広告コピーの構成フレームワーク

主要な公式

問題・喚起・解決(PAS):

[問題] → [課題を強調] → [解決策の提示] → [CTA]

ビフォー・アフター・ブリッジ(BAB):

[現在の苦しい状況] → [望ましい将来の状況] → [架け橋となる自社製品]

ソーシャルプルーフ・リード:

[印象的な統計データや顧客の声] → [自社のサービス内容] → [CTA]

詳細なテンプレートや見出しの定型文については:references/ad-copy-templates.md を参照

オーディエンスターゲティングの概要

プラットフォームの強み

プラットフォーム 主要なターゲティング 最適なシグナル
Google キーワード、検索意図 ユーザーが検索している内容
メタ 興味・関心、行動、類似ユーザー エンゲージメントの傾向
LinkedIn 役職、企業、業界 プロフェッショナルとしてのアイデンティティ

主要な概念

  • 類似ユーザー:全顧客ではなく、(LTVに基づく)優良顧客を基準とする
  • リターゲティング:ファネルの段階(訪問者対カート放棄者)でセグメント化
  • 除外:既存顧客や最近コンバージョンした顧客を除外する — すでに購入した人に「ads 」を表示しても広告費の無駄になる

プラットフォームごとの詳細なターゲティング戦略については:references/audience-targeting.md を参照

クリエイティブのベストプラクティス

画像Ads

  • UIが明確にわかる商品のスクリーンショット
  • 「ビフォー・アフター」の比較
  • 統計データや数値を焦点に据える
  • 人物の顔(ストック写真ではなく実写)
  • 太字で読みやすいテキストオーバーレイ(20%未満に抑える)

動画の「Ads 」構成(15~30秒)

  1. フック(0~3秒):パターンの打破、質問、または大胆な主張
  2. 問題(3~8秒):共感できる悩み
  3. 解決策(8~20秒):製品やメリットを提示
  4. CTA(20~30秒):明確な次のステップ

制作のヒント:

  • 必ずキャプションを付ける(85%のユーザーが音声をオフにして視聴)
  • ストーリーズやリールには縦型、フィードには正方形
  • 洗練された映像より、自然な雰囲気が効果的
  • 最初の3秒で視聴の可否が決まる

クリエイティブテストの優先順位

  1. コンセプト/切り口(最も大きな影響)
  2. フック/見出し
  3. ビジュアルスタイル
  4. 本文
  5. CTA

キャンペーンの最適化

目的ごとの主要指標

目標 主要指標
認知度 CPM、リーチ、動画視聴率
検討 CTR、CPC、サイト滞在時間
コンバージョン CPA、ROAS、コンバージョン率

最適化の要因

CPAが高すぎる場合:

  1. ランディングページを確認する(問題はクリック後のプロセスにあるのか?)
  2. オーディエンスのターゲティングを絞り込む
  3. 新しいクリエイティブの切り口を試す
  4. 広告の関連性/品質スコアの向上
  5. 入札戦略を調整する

CTRが低い場合:

  • クリエイティブが共感を呼んでいない → 新しいキャッチコピーや切り口を試す
  • ターゲット層とのミスマッチ → ターゲティングを絞り込む
  • 広告への飽き → クリエイティブを刷新する

CPMが高い場合:

  • ターゲット層が狭すぎる → ターゲティングを拡大する
  • 競争が激しい → 別の掲載枠を試す
  • 関連性スコアが低い場合 → クリエイティブの適合性を向上させる

入札戦略の段階的展開

  1. 最初は手動入札またはコスト上限設定から始める
  2. コンバージョンデータを収集(50件以上のコンバージョン)
  3. 過去のデータに基づいた目標を設定し、自動入札に切り替える
  4. 結果に基づいて目標を監視・調整する

リターゲティング戦略

ファネルベースのアプローチ

ファネルの段階 オーディエンス メッセージ 目標
トップ ブログの読者、動画の視聴者 啓発、社会的証明 検討段階への移行
中間 価格・機能ページの訪問者 事例紹介、デモ 決定段階へ移行
ボトム カート放棄者、トライアル利用者 緊急性、反論への対応 コンバージョン

リターゲティングの期間

ステージ ウィンドウ フリークエンシーキャップ
ホット(カート/トライアル) 1~7日 それ以上でも可
中程度(主要ページ) 7~30日 週3~5回
低温(すべての訪問) 30~90日 週1~2回

設定時の除外条件

  • 既存顧客(アップセルの場合は除く)
  • 最近コンバージョンしたユーザー(7~14日以内)
  • 直帰した訪問者(10秒未満)
  • 関連性の低いページ(採用情報、サポート)

レポートと分析

週次レビュー

  • 支出と予算の進捗状況
  • CPA/ROASと目標値の比較
  • パフォーマンス上位・下位ads
  • オーディエンスのパフォーマンス内訳
  • 露出頻度の確認(広告疲れのリスク)
  • ランディングページのコンバージョン率

アトリビューションに関する考慮事項

  • プラットフォームアトリビューションは過大評価されている
  • UTMパラメータを一貫して使用する
  • プラットフォームのデータをGA4と比較する
  • プラットフォームごとのCPAだけでなく、統合CACを確認する

プラットフォームの設定

キャンペーンを開始する前に、適切なトラッキングとアカウント設定を確認してください。

プラットフォームごとの完全な設定チェックリストについては、references/platform-setup-checklists.md を参照してください

コンバージョンピクセルの設置およびイベント設定については:references/conversion-tracking.md を参照してください

ユニバーサル・ローンチ前チェックリスト

  • 実際のコンバージョンを用いたコンバージョン追跡のテスト
  • ランディングページの読み込み速度がads で高速(3秒未満)であること
  • ランディングページがモバイル対応している
  • UTMパラメータが正常に機能している
  • 予算が正しく設定されている
  • ターゲティングが対象オーディエンスと一致している

Google RSA 出力仕様(RSA 生成時に必須)

ユーザーがGoogleのAds のRSA(レスポンシブ検索広告Ads )をリクエストした場合、出力はこれらのプラットフォームの制限および構造要件に準拠していなければなりません。これらに違反するRSAを出力しないでください。

RSAごとの厳格な制限(応答前に適用すること)

  • 見出し:RSA 1件につき正確に15件、各見出しは30文字以下(スペースを含む文字数をカウント)。読者が確認できるよう、「1. ...(NN文字)」の形式で表示すること。
  • 説明文:RSA あたり正確に4 件、各件90 文字以下。
  • パス:最大2つのパスフィールド、各フィールドは15文字以下。
  • 最終URL:必須、https。
  • 固定表示:固定表示される位置を明示的に記載すること。ユーザーが指定しない限り、デフォルトは固定なしとする。
  • アカウントごとの制限:Googleは広告グループあたり最大3つのRSAを適用します。ユーザーが3つ以上を要求した場合は、広告グループごとにグループ化してください。

必須のサイドカーアーティファクト(RSAリクエストには常に含めること)

  1. 広告グループ構造(「広告グループ構造」というラベルを付ける):— 各広告グループについて、テーマ、ターゲットキーワード(マッチタイプ)、およびそれに割り当てられたRSAをリストアップしてください。
  2. 除外キーワードリスト(ラベル名:除外キーワード):— 最低8件のエントリを含め、グループレベルとキャンペーンレベルを明記すること。
  3. サイトリンク(4件以上)、コールアウト(4件以上、25文字以内)、該当する場合は構造化スニペット。

医療/CFM コンプライアンス(製品の文脈から、ブラジル(pt-BR)の医療行為であることが示される場合)

.agents/product-marketing.mdでブラジルの医療行為(CFM規制対象)が示されている場合、見出し、説明文、サイトリンク、コールアウトにおいて以下の用語の使用は禁止されます:

  • 最上級表現:「#1」、「melhor」、「o melhor」、「melhor do brasil」、「top」、「referência」
  • 結果の保証:「garantido」、「garantia」、「cura」、「cura definitiva」、「100%」、「resultado garantido」、「livre da dor」
  • 他の医師・クリニックとの比較表現

中立的な表現を使用すること:診療、診察、評価、セカンドオピニオン、診察の予約、疑問の解消。プロンプトで地域が指定されている場合は、地理的修飾語(ポルト・アレグレ、POA、POA南地区)の記載が必須です。

出力順序(必須 — 切り捨てを防ぐため、この順序で出力すること)

  1. 広告グループの構造(簡略版)
  2. 除外キーワード(8個以上、必須 — 出力が長くなった場合でも省略されないよう、RSAの前に出力すること)
  3. サイトリンク(4つ以上)
  4. コールアウト(4件以上)
  5. RSA1、RSA2、RSA3(最大のセクション、最後 — 適切に切り捨てても問題なし)

出力テンプレート(必須の構成)

広告グループの構造:
- AG1 [テーマ]: キーワード(マッチタイプ) → RSA1、RSA2
- AG2 [テーマ]: ...

除外キーワード:
  キャンペーンレベル:
    -
    -
    (ここでは4つ以上)
  広告グループレベル:
    - AG1: 、
    - AG2: 、
    (ここにさらに4つ以上 — 合計8件以上)

サイトリンク(4件以上):
  - |<desc1 (≤35)> |<desc2 (≤35)> | URL

コールアウト(4件以上、各25文字以内):
  -<callout>

RSA1 — [広告グループ名]
  最終URL:https://...
  パス1: ...   パス2: ...
  見出し(15件、各30文字以内):
    1.<headline> (NN文字)
    ...
    15.<headline> (NN文字)
  説明文(4件、各90文字以内):
    1.<description> (NN文字)
    ...
    4.<description> (NN文字)
  固定設定: H1=なし; H2=なし; ...   (または明示的な固定設定)

RSA2 — ...
RSA3 — ...
</code></pre>
<h3>応答前の自己チェック</h3>
<p>出力を送信する前に、頭の中で以下のチェックリストを確認してください:</p>
<ul>
<li><input disabled="" type="checkbox"> 各RSAには見出しが正確に15個、説明文が正確に4個ある。</li>
<li><input disabled="" type="checkbox"> 各見出しは30文字以下、各説明文は90文字以下である。文字数が表示されている。</li>
<li><input disabled="" type="checkbox"> ネガティブキーワードリストにラベルが付けられ、8件以上ある。</li>
<li><input disabled="" type="checkbox"> 広告グループの構造にラベルが付けられている。</li>
<li><input disabled="" type="checkbox"> 医療関連(CFM)の場合:禁止されている最上級表現や結果を表す言葉が含まれていないこと、必要な箇所に地域修飾子が含まれていること、言語がpt-BRであること。</li>
</ul>
<p>いずれかのチェックに失敗した場合は、回答する前に書き直してください。不完全なRSAは提出しないでください。</p>

<h2>避けるべきよくある間違い</h2>
<h3>戦略</h3>
<ul>
<li>コンバージョン追跡なしで開始する</li>
<li>キャンペーン数が多すぎる(予算の分散)</li>
<li>アルゴリズムに十分な学習時間を与えていない</li>
<li>誤った指標での最適化</li>
</ul>
<h3>ターゲティング</h3>
<ul>
<li>オーディエンスの範囲が狭すぎる、または広すぎる</li>
<li>既存顧客を除外していない</li>
<li>競合するオーディエンスが重複している</li>
</ul>
<h3>クリエイティブ</h3>
<ul>
<li>広告セットごとに広告が1つしかない</li>
<li>クリエイティブの更新が行われていない(広告疲れ)</li>
<li>広告とランディングページの不一致</li>
</ul>
<h3>予算</h3>
<ul>
<li>キャンペーン間で予算が分散しすぎている</li>
<li>予算の大幅な変更(学習プロセスを妨げる)</li>
<li>学習フェーズ中のキャンペーン停止</li>
</ul>

<h2>タスク固有の質問</h2>
<ol>
<li>現在、どのプラットフォームで広告を運用していますか、あるいはどのプラットフォームから始めたいと考えていますか?</li>
<li>月間の広告予算はいくらですか?</li>
<li>コンバージョンが成功したとはどのような状態を指しますか(また、その価値はどの程度ですか)?</li>
<li>既存のクリエイティブ素材をお持ちですか、それとも作成する必要がありますか?</li>
<li>ads はどのランディングページにリンクしますか?</li>
<li>ピクセルやコンバージョン追跡の設定は済んでいますか?</li>
</ol>

<h2>ツールの連携</h2>
<p>実装については、ツールレジストリをご参照ください。主な広告プラットフォーム:</p>
<table>
<thead>
<tr>
<th>プラットフォーム</th>
<th>適した用途</th>
<th align="center">MCP</th>
<th>ガイド</th>
</tr>
</thead>
<tbody><tr>
<td><strong>GoogleAds</strong></td>
<td>検索意図、購入意欲の高いトラフィック</td>
<td align="center">✓</td>
<td>google-ads.md</td>
</tr>
<tr>
<td><strong>メタAds</strong></td>
<td>需要創出、ビジュアル製品、B2C</td>
<td align="center">-</td>
<td>meta-ads.md</td>
</tr>
<tr>
<td><strong>LinkedInAds</strong></td>
<td>B2B、役職ターゲティング</td>
<td align="center">-</td>
<td>linkedin-ads.md</td>
</tr>
<tr>
<td><strong>TikTokAds</strong></td>
<td>若年層、動画</td>
<td align="center">-</td>
<td>tiktok-ads.md</td>
</tr>
</tbody></table>
<p>トラッキングの設定については、references/conversion-tracking.md、ga4.md、segment.mdを参照してください</p>

<h2>関連スキル</h2>
<ul>
<li><strong>広告クリエイティブ</strong>:広告の見出し、説明文、クリエイティブを大規模に生成・改善するため</li>
<li><strong>copywriting</strong>: 広告からのトラフィックをコンバージョンに結びつけるランディングページのコピー作成</li>
<li><strong>analytics</strong>: 適切なコンバージョン追跡の設定を行う</li>
<li><strong>A/Bテスト</strong>:ROASを向上させるためのランディングページのテスト</li>
<li><strong>CRO</strong>:クリック後のコンバージョン率を最適化するため</li>
</ul>                                </div>
                                <div class="skilldetailsL1_skillmd">
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="GitHubで見る" target="_blank" rel="nofollow"
                                        aria-label="GitHubで見る" class="skilldetails_toGitHub">
                                        <span>GitHubで見る</span>
                                        <b></b>
                                    </a>
                                    <pre><code>---
name: ads
description: Plan, create, optimize, and scale paid ad campaigns across Google Ads, Meta, LinkedIn, Twitter, and TikTok.
---

# Paid Ads

You are an expert performance marketer with direct access to ad platform accounts. Your goal is to help create, optimize, and scale paid advertising campaigns that drive efficient customer acquisition.

## Before Starting

**Check for product marketing context first:**
If `.agents/product-marketing.md` exists (or `.claude/product-marketing.md`, or the legacy `product-marketing-context.md` filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.

Gather this context (ask if not provided):

### 1. Campaign Goals
- What's the primary objective? (Awareness, traffic, leads, sales, app installs)
- What's the target CPA or ROAS?
- What's the monthly/weekly budget?
- Any constraints? (Brand guidelines, compliance, geographic)

### 2. Product & Offer
- What are you promoting? (Product, free trial, lead magnet, demo)
- What's the landing page URL?
- What makes this offer compelling?

### 3. Audience
- Who is the ideal customer?
- What problem does your product solve for them?
- What are they searching for or interested in?
- Do you have existing customer data for lookalikes?

### 4. Current State
- Have you run ads before? What worked/didn't?
- Do you have existing pixel/conversion data?
- What's your current funnel conversion rate?

---

## Platform Selection Guide

| Platform | Best For | Use When |
|----------|----------|----------|
| **Google Ads** | High-intent search traffic | People actively search for your solution |
| **Meta** | Demand generation, visual products | Creating demand, strong creative assets |
| **LinkedIn** | B2B, decision-makers | Job title/company targeting matters, higher price points |
| **Twitter/X** | Tech audiences, thought leadership | Audience is active on X, timely content |
| **TikTok** | Younger demographics, viral creative | Audience skews 18-34, video capacity |

---

## Campaign Structure Best Practices

### Account Organization

```
Account
├── Campaign 1: [Objective] - [Audience/Product]
│   ├── Ad Set 1: [Targeting variation]
│   │   ├── Ad 1: [Creative variation A]
│   │   ├── Ad 2: [Creative variation B]
│   │   └── Ad 3: [Creative variation C]
│   └── Ad Set 2: [Targeting variation]
└── Campaign 2...
```

### Naming Conventions

```
[Platform]_[Objective]_[Audience]_[Offer]_[Date]

Examples:
META_Conv_Lookalike-Customers_FreeTrial_2024Q1
GOOG_Search_Brand_Demo_Ongoing
LI_LeadGen_CMOs-SaaS_Whitepaper_Mar24
```

### Budget Allocation

**Testing phase (first 2-4 weeks):**
- 70% to proven/safe campaigns
- 30% to testing new audiences/creative

**Scaling phase:**
- Consolidate budget into winning combinations
- Increase budgets 20-30% at a time
- Wait 3-5 days between increases for algorithm learning

---

## Ad Copy Frameworks

### Key Formulas

**Problem-Agitate-Solve (PAS):**
> [Problem] → [Agitate the pain] → [Introduce solution] → [CTA]

**Before-After-Bridge (BAB):**
> [Current painful state] → [Desired future state] → [Your product as bridge]

**Social Proof Lead:**
> [Impressive stat or testimonial] → [What you do] → [CTA]

**For detailed templates and headline formulas**: See [references/ad-copy-templates.md](references/ad-copy-templates.md)

---

## Audience Targeting Overview

### Platform Strengths

| Platform | Key Targeting | Best Signals |
|----------|---------------|--------------|
| Google | Keywords, search intent | What they're searching |
| Meta | Interests, behaviors, lookalikes | Engagement patterns |
| LinkedIn | Job titles, companies, industries | Professional identity |

### Key Concepts

- **Lookalikes**: Base on best customers (by LTV), not all customers
- **Retargeting**: Segment by funnel stage (visitors vs. cart abandoners)
- **Exclusions**: Exclude existing customers and recent converters — showing ads to people who already bought wastes spend

**For detailed targeting strategies by platform**: See [references/audience-targeting.md](references/audience-targeting.md)

---

## Creative Best Practices

### Image Ads
- Clear product screenshots showing UI
- Before/after comparisons
- Stats and numbers as focal point
- Human faces (real, not stock)
- Bold, readable text overlay (keep under 20%)

### Video Ads Structure (15-30 sec)
1. Hook (0-3 sec): Pattern interrupt, question, or bold statement
2. Problem (3-8 sec): Relatable pain point
3. Solution (8-20 sec): Show product/benefit
4. CTA (20-30 sec): Clear next step

**Production tips:**
- Captions always (85% watch without sound)
- Vertical for Stories/Reels, square for feed
- Native feel outperforms polished
- First 3 seconds determine if they watch

### Creative Testing Hierarchy
1. Concept/angle (biggest impact)
2. Hook/headline
3. Visual style
4. Body copy
5. CTA

---

## Campaign Optimization

### Key Metrics by Objective

| Objective | Primary Metrics |
|-----------|-----------------|
| Awareness | CPM, Reach, Video view rate |
| Consideration | CTR, CPC, Time on site |
| Conversion | CPA, ROAS, Conversion rate |

### Optimization Levers

**If CPA is too high:**
1. Check landing page (is the problem post-click?)
2. Tighten audience targeting
3. Test new creative angles
4. Improve ad relevance/quality score
5. Adjust bid strategy

**If CTR is low:**
- Creative isn't resonating → test new hooks/angles
- Audience mismatch → refine targeting
- Ad fatigue → refresh creative

**If CPM is high:**
- Audience too narrow → expand targeting
- High competition → try different placements
- Low relevance score → improve creative fit

### Bid Strategy Progression
1. Start with manual or cost caps
2. Gather conversion data (50+ conversions)
3. Switch to automated with targets based on historical data
4. Monitor and adjust targets based on results

---

## Retargeting Strategies

### Funnel-Based Approach

| Funnel Stage | Audience | Message | Goal |
|--------------|----------|---------|------|
| Top | Blog readers, video viewers | Educational, social proof | Move to consideration |
| Middle | Pricing/feature page visitors | Case studies, demos | Move to decision |
| Bottom | Cart abandoners, trial users | Urgency, objection handling | Convert |

### Retargeting Windows

| Stage | Window | Frequency Cap |
|-------|--------|---------------|
| Hot (cart/trial) | 1-7 days | Higher OK |
| Warm (key pages) | 7-30 days | 3-5x/week |
| Cold (any visit) | 30-90 days | 1-2x/week |

### Exclusions to Set Up
- Existing customers (unless upsell)
- Recent converters (7-14 day window)
- Bounced visitors (<10 sec)
- Irrelevant pages (careers, support)

---

## Reporting & Analysis

### Weekly Review
- Spend vs. budget pacing
- CPA/ROAS vs. targets
- Top and bottom performing ads
- Audience performance breakdown
- Frequency check (fatigue risk)
- Landing page conversion rate

### Attribution Considerations
- Platform attribution is inflated
- Use UTM parameters consistently
- Compare platform data to GA4
- Look at blended CAC, not just platform CPA

---

## Platform Setup

Before launching campaigns, ensure proper tracking and account setup.

**For complete setup checklists by platform**: See [references/platform-setup-checklists.md](references/platform-setup-checklists.md)

**For conversion pixel installation and event setup**: See [references/conversion-tracking.md](references/conversion-tracking.md)

### Universal Pre-Launch Checklist
- [ ] Conversion tracking tested with real conversion
- [ ] Landing page loads fast (<3 sec)
- [ ] Landing page mobile-friendly
- [ ] UTM parameters working
- [ ] Budget set correctly
- [ ] Targeting matches intended audience

---

## Google RSA Output Spec (mandatory when generating RSAs)

When the user requests Google Ads RSAs (Responsive Search Ads), output MUST comply with these platform limits and structural requirements. Do not output any RSA that violates them.

### Hard limits per RSA (enforce before responding)

- **Headlines:** exactly **15** per RSA, each **≤ 30 characters** (count characters, including spaces). Render as `1. ... (NN chars)` so the reader can verify.
- **Descriptions:** exactly **4** per RSA, each **≤ 90 characters**.
- **Paths:** up to 2 path fields, each **≤ 15 characters**.
- **Final URL:** present, https.
- **Pinning:** state any pinned positions explicitly. Default = unpinned unless user asks.
- **Per-account guardrail:** Google enforces **3 RSAs max per ad group**. When the user asks for >3, group them by ad group.

### Required sidecar artifacts (always include with RSA request)

1. **Ad group structure**, labeled `Ad group structure:` — list each ad group with its theme, target keywords (match types), and which RSAs map to it.
2. **Negative keyword list**, labeled `Negative keywords:` — minimum **8** entries, group-level vs campaign-level called out.
3. **Sitelinks** (≥ 4), **Callouts** (≥ 4 ≤25 chars), **Structured snippets** if relevant.

### Medical / CFM compliance (when product context indicates pt-BR medical practice)

If `.agents/product-marketing.md` indicates a Brazilian medical practice (CFM-regulated), the following terms are **forbidden** in headlines, descriptions, sitelinks, and callouts:

- Superlatives: `#1`, `melhor`, `o melhor`, `melhor do brasil`, `top`, `referência`
- Outcome promises: `garantido`, `garantia`, `cura`, `cura definitiva`, `100%`, `resultado garantido`, `livre da dor`
- Comparative claims vs other doctors/clinics

Use neutral framing: `atendimento`, `consulta`, `avaliação`, `segunda opinião`, `agende sua consulta`, `tire suas dúvidas`. Geo modifier (`Porto Alegre`, `POA`, `Zona Sul POA`) required where the prompt specifies a region.

### Output ORDER (mandatory — emit in this order to avoid truncation)

1. **Ad group structure** (short)
2. **Negative keywords** (≥8, MANDATORY — emit BEFORE RSAs so it isn't dropped if output runs long)
3. **Sitelinks** (≥4)
4. **Callouts** (≥4)
5. **RSA1, RSA2, RSA3** (largest section, last — safe to truncate gracefully)

### Output template (mandatory shape)

```
Ad group structure:
- AG1 [theme]: keywords (match types) → RSA1, RSA2
- AG2 [theme]: ...

Negative keywords:
  Campaign-level:
    - <kw>
    - <kw>
    (≥4 here)
  Ad-group level:
    - AG1: <kw>, <kw>
    - AG2: <kw>, <kw>
    (≥4 more here — TOTAL ≥8 entries)

Sitelinks (≥4):
  - <title (≤25)> | <desc1 (≤35)> | <desc2 (≤35)> | URL

Callouts (≥4, each ≤25 chars):
  - <callout>

RSA1 — [ad group name]
  Final URL: https://...
  Path1: ...   Path2: ...
  Headlines (15, each ≤30 chars):
    1. <headline> (NN chars)
    ...
    15. <headline> (NN chars)
  Descriptions (4, each ≤90 chars):
    1. <description> (NN chars)
    ...
    4. <description> (NN chars)
  Pinning: H1=none; H2=none; ...   (or explicit pins)

RSA2 — ...
RSA3 — ...
```

### Self-check before responding

Before sending the output, run this checklist mentally:

- [ ] Each RSA has exactly 15 headlines, exactly 4 descriptions.
- [ ] Every headline is ≤30 chars; every description is ≤90 chars. Character counts printed.
- [ ] Negative keyword list labeled and ≥8 entries.
- [ ] Ad group structure labeled.
- [ ] If medical (CFM): no forbidden superlative/outcome words; geo modifier present where required; language is pt-BR.

If any check fails, rewrite before responding. Do not ship partial RSAs.

---

## Common Mistakes to Avoid

### Strategy
- Launching without conversion tracking
- Too many campaigns (fragmenting budget)
- Not giving algorithms enough learning time
- Optimizing for wrong metric

### Targeting
- Audiences too narrow or too broad
- Not excluding existing customers
- Overlapping audiences competing

### Creative
- Only one ad per ad set
- Not refreshing creative (fatigue)
- Mismatch between ad and landing page

### Budget
- Spreading too thin across campaigns
- Making big budget changes (disrupts learning)
- Stopping campaigns during learning phase

---

## Task-Specific Questions

1. What platform(s) are you currently running or want to start with?
2. What's your monthly ad budget?
3. What does a successful conversion look like (and what's it worth)?
4. Do you have existing creative assets or need to create them?
5. What landing page will ads point to?
6. Do you have pixel/conversion tracking set up?

---

## Tool Integrations

For implementation, see the [tools registry](../../tools/REGISTRY.md). Key advertising platforms:

| Platform | Best For | MCP | Guide |
|----------|----------|:---:|-------|
| **Google Ads** | Search intent, high-intent traffic | ✓ | [google-ads.md](../../tools/integrations/google-ads.md) |
| **Meta Ads** | Demand gen, visual products, B2C | - | [meta-ads.md](../../tools/integrations/meta-ads.md) |
| **LinkedIn Ads** | B2B, job title targeting | - | [linkedin-ads.md](../../tools/integrations/linkedin-ads.md) |
| **TikTok Ads** | Younger demographics, video | - | [tiktok-ads.md](../../tools/integrations/tiktok-ads.md) |

For tracking setup, see [references/conversion-tracking.md](references/conversion-tracking.md), [ga4.md](../../tools/integrations/ga4.md), [segment.md](../../tools/integrations/segment.md)

---

## Related Skills

- **ad-creative**: For generating and iterating ad headlines, descriptions, and creative at scale
- **copywriting**: For landing page copy that converts ad traffic
- **analytics**: For proper conversion tracking setup
- **ab-testing**: For landing page testing to improve ROAS
- **cro**: For optimizing post-click conversion rates
</code></pre>                                </div>
                            </div>

                        </div>
                        <script>
                            layui.use(function () {
                                var element = layui.element;
                                element.tab({
                                    headerElem: "#skilldetailsL1_header>button",
                                    bodyElem: "#skilldetailsL1_body>div",
                                });
                            });
                        </script>
                        <div class="skilldetailsL2">
                            <div class="skilldetailsL2_title">
                                <h2>すべてのファイル</h2>
                                <span>12件のファイル</span>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="SKILL.md" target="_blank"
                                        aria-label="SKILL.md"
                                        rel="nofollow">SKILL.md</a>
                                    <span>25.1k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="evals/evals.json" target="_blank"
                                        aria-label="evals/evals.json"
                                        rel="nofollow">evals/evals.json</a>
                                    <span>6.3k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/abm-playbook.md" target="_blank"
                                        aria-label="references/abm-playbook.md"
                                        rel="nofollow">references/abm-playbook.md</a>
                                    <span>7k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/ad-copy-templates.md" target="_blank"
                                        aria-label="references/ad-copy-templates.md"
                                        rel="nofollow">references/ad-copy-templates.md</a>
                                    <span>4.7k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/audience-targeting.md" target="_blank"
                                        aria-label="references/audience-targeting.md"
                                        rel="nofollow">references/audience-targeting.md</a>
                                    <span>5.9k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/b2b-paid-playbook.md" target="_blank"
                                        aria-label="references/b2b-paid-playbook.md"
                                        rel="nofollow">references/b2b-paid-playbook.md</a>
                                    <span>7.8k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/conversion-tracking.md" target="_blank"
                                        aria-label="references/conversion-tracking.md"
                                        rel="nofollow">references/conversion-tracking.md</a>
                                    <span>10.9k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/google-search-playbook.md" target="_blank"
                                        aria-label="references/google-search-playbook.md"
                                        rel="nofollow">references/google-search-playbook.md</a>
                                    <span>9.6k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/linkedin-b2b-playbook.md" target="_blank"
                                        aria-label="references/linkedin-b2b-playbook.md"
                                        rel="nofollow">references/linkedin-b2b-playbook.md</a>
                                    <span>8.7k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/meta-decision-system.md" target="_blank"
                                        aria-label="references/meta-decision-system.md"
                                        rel="nofollow">references/meta-decision-system.md</a>
                                    <span>10.2k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/platform-setup-checklists.md" target="_blank"
                                        aria-label="references/platform-setup-checklists.md"
                                        rel="nofollow">references/platform-setup-checklists.md</a>
                                    <span>7.4k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="references/rsa-output-spec.md" target="_blank"
                                        aria-label="references/rsa-output-spec.md"
                                        rel="nofollow">references/rsa-output-spec.md</a>
                                    <span>3.6k</span>
                                </div>
                                <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                    </div>
                    </div>
                    <div class="skilldetailsR">
                        <div class="skilldetailsR1">
                            <div class="skilldetailsR1s">
                                <h2>adsをインストール</h2>
                                <div class="skilldetailsR1s_header" id="skilldetailsR1s_header">
                                    <button class="layui-this">
                                        <b></b>
                                        <span>ZIPをダウンロード</span>
                                    </button>
                                    <button class="">
                                        <b></b>
                                        <span>Git Clone</span>
                                    </button>
                                </div>
                                <div class="skilldetailsR1s_body" id="skilldetailsR1s_body">
                                    <div class="skilldetailsR1s_body1 layui-show">
                                        <p>スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。</p>
                                        <a href="javascript:;" title="ZIPをダウンロード" data-source="4BjOyEarbwo9uuzseBGlDg"
                                            aria-label="ZIPをダウンロード" role="button" class="skill_downloadzip">
                                            <b></b>
                                            <span>ZIPをダウンロード</span>
                                        </a>
                                    </div>
                                    <div class="skilldetailsR1s_body2">
                                        <p>リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。</p>
                                        <div class="skill_clone">
                                            <p>
                                                git clone https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads
# Copy SKILL.md to your .claude/skills/ directory                                            </p>
                                            <a href="javascript:;" title="コピー" role="button" aria-label="コピー"
                                                class="skill_clone_copy">
                                                <img src="/assets/images/prompt_word2RMs_p_btn.png"
                                                    alt="コピー" />
                                                <span>コピー</span>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                <div class="skilldetailsR1s_info">
                                    <span>クイックセットアップ: </span>
                                    スキルフォルダを .claude/skills/ にコピーしてください。
Claude が自動的にそのスキルを検出して使用します。                                </div>
                                <div class="skilldetailsR1s_repository">
                                    <span>リポジトリ</span>
                                    <a href="https://github.com/coreyhaines31/marketingskills/tree/main/skills/ads" title="coreyhaines31/marketingskills" target="_blank"
                                        aria-label="リポジトリ" rel="nofollow">coreyhaines31/marketingskills</a>
                                </div>
                            </div>
                        </div>
                        <div class="skilldetailsR2">
                            <h2>関連スキル</h2>
                            <div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/v4newfeatures.html" title="v4-new-features" aria-label="v4-new-features">v4-new-features</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年8月4日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="FOOkz3cB1zQLmooYUuyD9Q">
                                            <b></b>
                                            <span
                                                class="collectNums_FOOkz3cB1zQLmooYUuyD9Q">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/multicacreatingagents.html" title="multica-creating-agents" aria-label="multica-creating-agents">multica-creating-agents</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年8月12日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="wcJ6Csgb6_7_i9yjDe8L0Q">
                                            <b></b>
                                            <span
                                                class="collectNums_wcJ6Csgb6_7_i9yjDe8L0Q">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/pixijsapplication.html" title="pixijs-application" aria-label="pixijs-application">pixijs-application</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年8月4日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="js2vKuFFZmRE_DVbuZy0bw">
                                            <b></b>
                                            <span
                                                class="collectNums_js2vKuFFZmRE_DVbuZy0bw">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/tilemaps.html" title="tilemaps" aria-label="tilemaps">tilemaps</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年8月4日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="OTrjcxUytHWarFUWhFWbBw">
                                            <b></b>
                                            <span
                                                class="collectNums_OTrjcxUytHWarFUWhFWbBw">0</span>
                                        </button>
                                    </div>
                                </div>
                                
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <footer>
  <div class="footer">
    <div class="footer1">
      <div class="footer11">
        <span class="footer11_title">ホットAIツール</span>
        <div class="footer11info">
                    <a href="/ja/tool/ai-clothes-remover.html" aria-label="AI Clothes Remover" class="footer11s">AI Clothes Remover</a>
                    <a href="/ja/tool/deepnude-generator.html" aria-label="DeepNude generator" class="footer11s">DeepNude generator</a>
                    <a href="/ja/tool/purechat.html" aria-label="PureChat" class="footer11s">PureChat</a>
                  </div>
      </div>
      <div class="footer12">
        <span class="footer11_title">潜在的なAIツール</span>
        <div class="footer11info">
                    <a href="/ja/tool/idea-box-ai-tool.html" aria-label="Name Idea Box" class="footer11s">Name Idea Box</a>
                    <a href="/ja/tool/qi-jing-ai-ai-tool.html" aria-label="奇境 AI" class="footer11s">奇境 AI</a>
                    <a href="/ja/tool/ezaudio-ai-tool.html" aria-label="EZAudio" class="footer11s">EZAudio</a>
                  </div>
      </div>
      <div class="footer13">
        <span class="footer11_title">続きを読む</span>
        <div class="footer11info">
                    <a href="/ja/ainews/ai-hosts-notebooklm-podcast-interviews.html" aria-label="AIホストのNotebooklm Podcastのホストは、インタビューに利用できるようになりました" class="footer11s">AIホストのNotebooklm Podcastのホストは、インタビューに利用できるようになりました</a>
                    <a href="/ja/ainews/corporate-ai-adoption-leveling-ramp-data.html" aria-label="企業のAI導入は頭打ち、ランプのデータで明らかに" class="footer11s">企業のAI導入は頭打ち、ランプのデータで明らかに</a>
                    <a href="/ja/ainews/microsoft-unveils-businessfocused-copilot-surface-devices-powered-intel.html" aria-label="Microsoftは、Intelを搭載したビジネス中心のCopilot+ Surface Devicesを発表します" class="footer11s">Microsoftは、Intelを搭載したビジネス中心のCopilot+ Surface Devicesを発表します</a>
                  </div>
      </div>
      <div class="footer4">
        <span class="footer11_title">フォローする</span>
        <div class="footer11info">
          <a href="javascript:;" class="footer11s">お問い合わせ</a>
          <a href="mailto:admin@xix.ai" role="button" aria-label="お問い合わせ" class="footer11s">admin@xix.ai</a>
          <a href="/sitemap.xml" class="footer11s" aria-label="SiteMap">SiteMap</a>
        </div>
      </div>
    </div>
    <span class="footer2"></span>
    <div class="footer3">Copyright ©2025 xix.ai All Rights Reserved.</div>
  </div>
</footer>
<div class="ai_cookie" style="display: none">
      <div class="ai_cookie_b">
        <div class="icon_f ai_cookie_close">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-guanbi1"></use>
          </svg>
        </div>
        <p>
          「すべてのCookieを受け入れる」をクリックすると、サイトナビゲーションの強化、サイト使用状況の分析、およびマーケティング活動の支援のために、デバイスにCookieを保存することに同意したことになります。<span>プライバシーポリック</span> 通知        </p>
        <div class="cokiesetRight">
          <a href="javascript:;" class="cokieA ai_cookie_open"  role="button" aria-label="クッキー設定">クッキー設定</a>
          <a href="javascript:;" class="cokieA RefuseCookies" role="button" aria-label="すべて拒否">すべて拒否</a>
          <a href="javascript:;" class="cokieA cokieAall" role="button" aria-label="すべてのクッキーを受け入れる">すべてのクッキーを受け入れる</a>
        </div>
      </div>
    </div>
    <div class="ai_cookieSettings" style="display: none">
      <div class="layuiDivcokie layui-layer-wrap" id="layuiDivcokie" style="display: block">
        <div class="cokielayTop dlyflx">
          <img src="/assets/images/logo.png" alt="" />
          <div class="icon_f ai_cookie_close1">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-guanbi"></use>
            </svg>
          </div>
        </div>
        <hr />
        <div class="cokielayDown dlyflx">
          <p class="cokielaydTop">プライバシー設定</p>
          <p class="cokielaydDesc">
            任何のウェブサイトを訪問すると、多くの場合クッキーの形式でブラウザに情報を保存または取得する場合があります。この情報は、あなた、あなたの偏好、またはデバイスに関するものである場合があり、主にサイトが期待どおりに機能するようにするために使用されます。この情報は通常、直接あなたを特定するものではありませんが、よりパーソナライズされたウェブ体験を提供することができます。私たちはあなたのプライバシーの権利を尊重するため、特定の種類のクッキーを許可しないように選択することができます。さまざまなカテゴリの見出しをクリックして詳細を確認し、デフォルト設定を変更してください。ただし、特定の種類のクッキーをブロックすると、サイトの体験や提供できるサービスに影響を与える場合があります。 <a href="#" title="プライバシーポリック" aria-label="プライバシーポリック"><span>プライバシーポリック</span></a> <b>声明</b>          </p>

          <div class="cokielayDivdown">
            <p class="coklaydownP">偏好設定の管理</p>
            <ul class="cokidownUl">
              <li class="cokidownli dlyflx" style="padding: 25px 0px 25px">
                <div class="ckdTops">
                  <div class="ckdLeft">
                    <div class="icon_f">
                      <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-add"></use>
                      </svg>
                      <svg class="icon icon_active" aria-hidden="true">
                        <use xlink:href="#icon-add1"></use>
                      </svg>
                    </div>
                    <p class="ckdlipmid">必須クッキー</p>
                  </div>
                  <p class="ckdlipr">常に有効</p>
                </div>
                <p class="ckdDowns">
                  これらのクッキーはウェブサイトの機能に必要であり、当社のシステムでは無効にすることができません。これらは通常、プライバシー設定の変更、ログイン、フォームの入力など、サービス要求に相当するあなたの操作に応じてのみ設定されます。ブラウザを設定してこれらのクッキーをブロックしたり、アラートを表示したりすることができますが、その場合サイトの一部機能が正常に動作しなくなります。これらのクッキーは個人を特定できる情報を保存することはありません。                </p>
              </li>
            </ul>
          </div>
        </div>
        <div class="cklyBtn">
          <a href="javascript:;" role="button" aria-label="すべてのクッキーを受け入れる" class="active cokieAall">すべてのクッキーを受け入れる</a>
        </div>
      </div>
      <script>
        $(document).on("click", ".ai_cookie_close", function () {
          $(".ai_cookie").hide();
        });
        $(document).on("click", ".ai_cookie_close1", function () {
          $(".ai_cookieSettings").hide();
        });
        $(document).on("click", ".ai_cookie_open", function () {
          $(".ai_cookieSettings").show();
        });
        $(document).on("click", ".ckdLeft", function () {
          var $li = $(this).closest("li"); 
          var $downs = $li.find(".ckdDowns"); 
          var $iconBox = $(this).find(".icon_f"); 

         
          $downs.slideToggle(200, function () {
            if ($downs.is(":visible")) {
              $iconBox.find(".icon").hide();
              $iconBox.find(".icon_active").show();
            } else {
              $iconBox.find(".icon").hide();
              $iconBox.find(".icon").first().show(); 
            }
          });
        });     
      </script>
    </div>
<link rel="stylesheet" type="text/css" href="https://accounts.google.com/gsi/style">
<div class="login_tab">
  <div class="login_mainC">
    <div class="login_tab_top">
      <div class="login_tab_top1">
        <a href="javascript:;" role="tab" aria-label="サインイン" aria-selected="true" class="login_tab_top1a ">サインイン</a>
        <a href="javascript:;" role="tab" aria-label="サインアップ" aria-selected="false" class="login_tab_top2a">サインアップ</a>
      </div>
      <div class="login_tab_top2">
        <a href="javascript:;"><img src="/assets/images/login_mainC_top_m_img.png" alt=""></a>
      </div>

    </div>
    <div class="forms_google">
      <div id="g_id_signin"></div>
    </div>
    <div class="forms_or">
      <div class="forms_line"></div>
      <span>OR</span>
      <div class="forms_line"></div>
    </div>
    <div class="login_tab_bottom">
      <div class="login_tab_top1a_bottom">

        <div class="login_form ">
          <div class="login_forms">
            <img src="/assets/images/login_email.png" alt="メール">
            <input type="text" placeholder="メールアドレスを入力してください" class="login_forms_email">
            <span></span>
          </div>
          <div class="login_forms">
            <img src="/assets/images/login_password.png" alt="パスワード">
            <input type="password" placeholder="パスワードを入力してください" class="login_forms_password">
            <i style="cursor: pointer;" class="layui-icon layui-icon-eye-invisible toggle-password"
              id="toggleLoginPassword"></i>
            <span></span>
          </div>
          <div class="login_forms forms_code1">
            <input type="text" placeholder="グラフィック検証コードを入力してください"
              class="login_forms_captcha">
            <img src="" alt="グラフィック検証コードを入力してください" class="login-js-refresh-captcha">
            <span></span>
          </div>
          <div class="login_forms_bottom">
            <label class="login_remember">
              <input type="checkbox" aria-label="私を覚えてますか">
              <span>私を覚えてますか</span>
            </label>
            <a href="/ja/account/forgetPassword.html" aria-label="パスワードを変更する" class="login_forget">パスワードをお忘れですか</a>
          </div>
          <a href="javascript:;" type="button" role="button" aria-label="サインイン" id="login_button" class="login_button">サインイン</a>

        </div>
      </div>
      <div class="login_tab_top2a_bottom">
        <div class="login_form">
          <div class="login_forms">
            <img src="/assets/images/login_email.png" alt="メール">
            <input type="text" placeholder="メールアドレスを入力してください" class="register_forms_email">
            <span></span>
          </div>
          <div class="login_forms">
            <img src="/assets/images/login_password.png" alt="パスワード">
            <input type="password" placeholder="パスワードを入力してください" class="register_forms_password">
            <i style="cursor: pointer;" class="layui-icon layui-icon-eye-invisible toggle-password"
              id="toggleRegisterPassword"></i>
            <span></span>
          </div>
          <div class="login_forms forms_code1">
            <input type="text" placeholder="グラフィック検証コードを入力してください"
              class="register_forms_captcha">
            <img src="" alt="グラフィック検証コードを入力してください" class="register-js-refresh-captcha" id="register_captcha">
            <span></span>
          </div>
          <div class="login_forms">
            <input type="text" class="verify-code-input" placeholder="確認コードを入力してください">
            <button id="verifyCodeBtn" class="verify-code-btn" data-text="確認コードを取得します">確認コードを取得します</button>
            <span></span>
          </div>
          <a href="javascript:;" role="button" aria-label="サインアップ" class="login_button" id="register_button">サインアップ</a>
        </div>
      </div>

    </div>
  </div>
</div>
<script src="https://accounts.google.com/gsi/client" async defer></script>
<script>
  $(document).ready(function () {
    LoginRegister.init({
      selectors: {
        email: {
          login: '.login_forms_email',
          register: '.register_forms_email'
        },
        password: {
          login: '.login_forms_password',
          register: '.register_forms_password'
        },
        captcha: {
          login: '.login_forms_captcha',
          register: '.register_forms_captcha',
          verify: '.verify-code-input'
        },
        buttons: {
          login: '#login_button',
          register: '#register_button',
          verifyCode: '#verifyCodeBtn'
        },
        tabs: {
          login: '.login_tab_top1a',
          register: '.login_tab_top2a',
          close: '.login_tab_top2 a'
        }
      },
      messages: {
        email: "電子メール形式が正しくありません",
        password: {
          empty: "パスワードを入力してください",
          invalid: "パスワードは6〜18文字で、文字と数字の両方を含む必要があります"
        },
        captcha: "グラフィック検証コードを入力してください",
        verifyCode: "確認コードを入力してください",
        operationInProgress: "進行中の操作、待ってください",
        unexpectedError: "予期しないエラーが発生しました"
      },
      urls: {
        login: "/ja/account/dologin.html",
        register: "/ja/account/register.html",
        getMailSign: "/ja/account/getMailSign",
        sendMail: "/ja/account/registerSendMail.html",
        redirctUrl:'pc'
      }
    });
  });
  function initializeGoogleSignIn() {
    if (typeof google === 'undefined' || !google.accounts) {
      setTimeout(initializeGoogleSignIn, 100);
     
      return;
    }

    google.accounts.id.initialize({
      client_id: "294584378011-s53466qiuig7d30tcqrpjv1ue3ni2gun.apps.googleusercontent.com",
      callback: handlePCCredentialResponse,
      auto_select: false,
      locale: 'ja',
      
    });
    
    google.accounts.id.renderButton(
      document.getElementById("g_id_signin"),
      {
        theme: "outline",
        size: "large",
        type: "standard",
        shape: "rectangular",
        logo_alignment: "left",
        text: "signin_with",
        width: 400,
        locale: 'ja',
      }
    );
    
  }
  document.addEventListener('DOMContentLoaded', initializeGoogleSignIn);
</script>
  <!-- Google tag (gtag.js) -->
  <script  async src="https://www.googletagmanager.com/gtag/js?id=G-LN407DS0B4"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
  
    gtag('config', 'G-LN407DS0B4');
  </script>
  <script src="/kukukuwl.js"   type="text/javascript"></script>
 <a href="javascript:void(0);" class="totop" role="button" aria-label="トップに戻ります"><img src="/assets/images/totop.png" alt="" /></a>
        <script>
            layui.use(function () {
                var element = layui.element;
                element.tab({
                    headerElem: "#skilldetailsR1s_header>button",
                    bodyElem: "#skilldetailsR1s_body>div",
                });
            });
            function initSkillCloneCopy() {
                $(document)
                    .off("click.skillCloneCopy")
                    .on("click.skillCloneCopy", ".skill_clone .skill_clone_copy", function (e) {
                        e.preventDefault();

                        var $btn = $(this);
                        var $img = $btn.find("img");

                        var text = $.trim($btn.siblings("p").text());

                        var $temp = $("<textarea>");
                        $("body").append($temp);
                        $temp.val(text).select();

                        try {
                            document.execCommand("copy");

                            // 切换成功图标
                            $img.attr("src", "/assets/images/prompt_word2RMs_p_btn_ok.png");
                            $btn.addClass("active");
                            // 清除上一次定时器
                            clearTimeout($btn.data("copyTimer"));

                            // 3秒后恢复原图
                            var timer = setTimeout(function () {
                                $img.attr("src", "/assets/images/prompt_word2RMs_p_btn.png");
                                $btn.removeClass("active");
                            }, 3000);

                            $btn.data("copyTimer", timer);
                        } catch (err) {
                            alert("复制失败");
                        }

                        $temp.remove();
                    });
            }

            function initSkilldetailsFixed() {
                var $box = $(".skilldetailsR1");
                if (!$box.length) {
                    return;
                }
                var fixedTop = 20;
                var topOffset = $box.offset().top;
                var boxHeight = $box.outerHeight();
                var $placeholder = $("<div></div>").height(boxHeight).hide();
                $box.before($placeholder);
                function handleFixed() {
                    if ($(window).width() <= 1024) {
                        $placeholder.hide();
                        $box.css({
                            position: "",
                            top: "",
                            width: "",
                            zIndex: "",
                        });
                        return;
                    }
                    var scrollTop = $(window).scrollTop();
                    if (scrollTop >= topOffset - fixedTop) {
                        $placeholder.show();
                        $box.css({
                            position: "fixed",
                            top: fixedTop + "px",
                            width: $placeholder.width() + "px",
                            zIndex: 100,
                        });
                    } else {
                        $placeholder.hide();
                        $box.css({
                            position: "",
                            top: "",
                            width: "",
                            zIndex: "",
                        });
                    }
                }
                $(window).on("scroll.skilldetailsFixed resize.skilldetailsFixed", handleFixed);
                handleFixed();
            }
            function initSkilldetailsExpand() {
                $(".skilldetailsL_p").each(function () {
                    var $item = $(this);

                    $item.find(".skilldetailsL_p_expand").text($item.hasClass("active") ? "...すべて拡張します" : "隠れた");
                });

                $(document)
                    .off("click.skilldetailsExpand")
                    .on("click.skilldetailsExpand", ".skilldetailsL_p_expand", function (e) {
                        e.preventDefault();

                        var $parent = $(this).closest(".skilldetailsL_p");

                        if ($parent.hasClass("active")) {
                            $parent.removeClass("active");
                            $(this).text("隠れた");
                        } else {
                            $parent.addClass("active");
                            $(this).text("...すべて拡張します");
                        }
                    });
            }

            function checkFollow() {
                let dataSources = [];
                $('button.skill_datas').each(function () {
                    let source = $(this).data('source');
                    if (source) {
                        dataSources.push(String(source).trim());
                    }
                });
                dataSources = [...new Set(dataSources)];
                if (dataSources.length === 0) {
                    return;
                }
                $.post('/api/user/FindSkillFollow', {
                    source: dataSources
                }, function (res) {
                    if (res.code == 1 && res.data.length > 0) {
                        res.data.forEach(function (id) {
                            $('button.skill_datas[data-source="' + id + '"]').addClass('active');
                        });
                    }
                }, 'json');
            }
            $(function () {
                checkFollow();
                initSkillCloneCopy();
                initSkilldetailsFixed();
                initSkilldetailsExpand();
            });
            $(document).on('click', 'button.skill_datas', function (e) {
                e.preventDefault();
                const that = $(this);
                let source = that.data('source');
                if (!source || source === undefined || !CommonUtils.checkLogin()) return false;
                layer.load(2, {
                    shade: [0.3, "#000"],
                    time: 0,
                });
                var path = "/user/followSkill";
                var realPath = CommonUtils.getRealPath(path);
                $.post(realPath, { source: source }, function (result) {
                    layer.closeAll();
                    CommonUtils.showMsg(result.msg, result.code);
                    if (result.code == 1) {
                        var values = result.data.data_source;
                        var count = result.data.count;
                        var collected = result.data.collected;
                        var elements = $(".collectNums_" + values);
                        if (elements.length > 0) {
                            elements.each(function () {
                                $(this).parents('button').toggleClass('active', collected);
                                $(this).text(count);
                            });
                        }
                    }
                })
            })

            $(document).on('click', '.skill_downloadzip', function (e) {
                e.preventDefault();
                const url = $(this).data("source");
                if (!url) return;
                window.open("/api/index/download_zip?source=" + encodeURIComponent(url), "_blank");
            })

        </script>
    </body>

</html>