選項

在 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. 產品與優惠

  • 您要推廣什麼?(產品、免費試用、引流誘因、產品演示)
  • 著陸頁網址為何?
  • 這項優惠的吸引力何在?

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_搜尋_品牌_人口統計_持續進行
LI_潛在客戶開發_SaaS 首席行銷長_白皮書_2024年3月

預算分配

測試階段(前 2-4 週):

  • 70% 分配給已驗證/穩健的廣告活動
  • 30% 用於測試新受眾/廣告素材

擴大規模階段:

  • 將預算集中投入成效最佳的組合
  • 每次將預算增加 20-30%
  • 每次增加預算後間隔 3-5 天,以利演算法學習

廣告文案框架

關鍵公式

問題-激化-解決 (PAS):

[問題] → [激化痛點] → [提出解決方案] → [行動呼籲]

前後對比-橋樑(BAB):

[當前的痛苦狀態] → [理想的未來狀態] → [您的產品作為橋樑]

社會證明引導法:

[令人印象深刻的數據或客戶見證] → [您的服務內容] → [行動呼籲 (CTA)]

如需詳細範本與標題公式:請參閱 references/ad-copy-templates.md

受眾定位概覽

平台優勢

平台 關鍵定位 最佳訊號
Google 關鍵字、搜尋意圖 用戶的搜尋內容
Meta 興趣、行為、相似受眾 互動模式
LinkedIn 職稱、公司、產業 專業身分

關鍵概念

  • 相似受眾:以最佳客戶(按終身價值 LTV 排序)為基準,而非所有客戶
  • 再行銷:依銷售漏斗階段進行分群(訪客 vs. 購物車棄單者)
  • 排除條件:排除現有客戶及近期轉化者——向已購買者展示「ads 」會浪費預算

各平台的詳細受眾定位策略:請參閱 references/audience-targeting.md

廣告素材最佳實踐

圖片Ads

  • 清晰展示使用者介面的產品截圖
  • 前後對比圖
  • 以數據和數字為焦點
  • 真人臉部(真實照片,非庫存圖片)
  • 醒目且易讀的文字疊加(佔比需低於 20%)

採用「Ads 」結構的影片(15-30 秒)

  1. 開場鉤子(0-3 秒):打破常規、提問或大膽陳述
  2. 問題(3-8 秒):觀眾能感同身受的痛點
  3. 解決方案(8-20 秒):展示產品/效益
  4. 行動呼籲(CTA)(20-30 秒):明確的下一步行動

製作要點:

  • 務必添加字幕(85% 觀眾會關閉聲音觀看)
  • 限時動態/Reels 採用縱向畫面,動態消息採用正方形畫面
  • 自然風格的表現優於過度修飾
  • 前 3 秒決定觀眾是否繼續觀看

創意測試優先順序

  1. 概念/切入點(影響最大)
  2. 吸睛點/標題
  3. 視覺風格
  4. 正文
  5. 行動呼籲

活動優化

依目標劃分的關鍵指標

目標 主要指標
品牌認知 每千次曝光成本 (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 進行比較
  • 應檢視綜合獲客成本(CAC),而非僅關注平台每轉換成本(CPA)

平台設定

在啟動廣告活動前,請確保追蹤機制與帳戶設定正確無誤。

各平台的完整設定檢查清單:請參閱 references/platform-setup-checklists.md

有關轉換像素安裝與事件設定:請參閱 references/conversion-tracking.md

通用啟動前檢查清單

  • 已透過實際轉換測試轉換追蹤功能
  • 著陸頁載入速度ads 快速 (<3 秒)
  • 著陸頁支援行動裝置
  • UTM 參數運作正常
  • 預算設定正確
  • 受眾定位符合目標群體

Google RSA 輸出規格(生成 RSA 時為必填項目)

當使用者請求 GoogleAds 的 RSA(響應式搜尋廣告Ads )時,輸出內容必須符合這些平台限制與結構要求。請勿輸出任何違反這些規定的 RSA。

每則 RSA 的硬性限制(回應前須執行)

  • 標題:每個 RSA 精確為15則,每則≤ 30 個字元(計入空格)。呈現為「1. ... (NN 個字元)」,以便讀者核對。
  • 描述:每個 RSA 必須為4則,每則≤ 90 個字元。
  • 路徑:最多 2 個路徑欄位,每個≤ 15 個字元。
  • 最終網址:必須存在,且為 https 格式。
  • 固定顯示:請明確標示任何固定顯示的位置。預設為未固定,除非使用者特別要求。
  • 每帳戶限制:Google 規定每個廣告群組最多 3 個 RSA。當使用者要求超過 3 個時,請按廣告群組進行分組。

必備的 sidecar 相關資料(提交 RSA 請求時必須一併包含)

  1. 廣告群組結構,標示為「廣告群組結構」:— 列出每個廣告群組及其主題、目標關鍵字(匹配類型),以及對應的 RSA。
  2. 否定關鍵字清單,標籤為「否定關鍵字」:— 至少8筆條目,並明確區分群組層級與廣告活動層級。
  3. 網站連結(≥ 4 項)、突出顯示文字(≥ 4 項,≤25 個字元),以及相關的結構化摘要。

醫療/CFM 合規性(當產品背景顯示為巴西醫療實務時)

若.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 — [廣告群組名稱]
  最終網址: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>每個廣告組合僅有一則廣告</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>MetaAds</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>文案撰寫</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="/zh-tw/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-08-04</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="/zh-tw/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-08-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="/zh-tw/skill/detail/pixijsapplication.html" title="pixijs-application" aria-label="pixijs-application">pixijs-application</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新時間                                                2026-08-04</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="/zh-tw/skill/detail/tilemaps.html" title="tilemaps" aria-label="tilemaps">tilemaps</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新時間                                                2026-08-04</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">熱門人工智能工具</span>
        <div class="footer11info">
                    <a href="/zh-tw/tool/ai-clothes-remover.html" aria-label="AI Clothes Remover" class="footer11s">AI Clothes Remover</a>
                    <a href="/zh-tw/tool/deepnude-generator.html" aria-label="DeepNude generator" class="footer11s">DeepNude generator</a>
                    <a href="/zh-tw/tool/purechat.html" aria-label="PureChat" class="footer11s">PureChat</a>
                  </div>
      </div>
      <div class="footer12">
        <span class="footer11_title">有潛力的人工智能工具</span>
        <div class="footer11info">
                    <a href="/zh-tw/tool/idea-box-ai-tool.html" aria-label="Name Idea Box" class="footer11s">Name Idea Box</a>
                    <a href="/zh-tw/tool/qi-jing-ai-ai-tool.html" aria-label="奇境 AI" class="footer11s">奇境 AI</a>
                    <a href="/zh-tw/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="/zh-tw/ainews/ai-hosts-notebooklm-podcast-interviews.html" aria-label="AI寄主Notebooklm播客現已上" class="footer11s">AI寄主Notebooklm播客現已上</a>
                    <a href="/zh-tw/ainews/corporate-ai-adoption-leveling-ramp-data.html" aria-label="Ramp 數據顯示,企業對 AI 的採納已進入停滯期" class="footer11s">Ramp 數據顯示,企業對 AI 的採納已進入停滯期</a>
                    <a href="/zh-tw/ainews/microsoft-unveils-businessfocused-copilot-surface-devices-powered-intel.html" aria-label="Microsoft推出了以商業為中心的副吉洛特+地表設備" class="footer11s">Microsoft推出了以商業為中心的副吉洛特+地表設備</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="Cookie 設定">Cookie 設定</a>
          <a href="javascript:;" class="cokieA RefuseCookies" role="button" aria-label="全部拒絕">全部拒絕</a>
          <a href="javascript:;" class="cokieA cokieAall" role="button" aria-label="接受所有 Cookie">接受所有 Cookie</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">
            當您訪問任何網站時,網站可能會在您的瀏覽器中存儲或檢索信息,主要以Cookie的形式。這些信息可能與您、您的偏好或設備有關,主要用於使網站按您期望的方式運行。這些信息通常不會直接識別您的身份,但可以為您提供更個性化的網絡體驗。由於我們尊重您的隱私權,您可以選擇不允許某些類型的Cookie。點擊不同的類別標題以了解更多信息並更改我們的默認設置。但是,阻止某些類型的Cookie可能會影響您對網站的體驗以及我們能夠提供的服務。 <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">嚴格必要Cookie</p>
                  </div>
                  <p class="ckdlipr">始終啟用</p>
                </div>
                <p class="ckdDowns">
                  這些Cookie是網站正常運行所必需的,無法在我們的系統中關閉。它們通常僅在您執行服務請求操作時設定,例如設定隱私偏好、登錄或填寫表單。您可以將瀏覽器設定為阻止這些Cookie或就這些Cookie向您發出警報,但網站的某些部分屆時將無法正常工作。這些Cookie不會存儲任何個人身份識別信息。                </p>
              </li>
            </ul>
          </div>
        </div>
        <div class="cklyBtn">
          <a href="javascript:;" role="button" aria-label="接受所有 Cookie" class="active cokieAall">接受所有 Cookie</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="/zh-tw/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: "/zh-tw/account/dologin.html",
        register: "/zh-tw/account/register.html",
        getMailSign: "/zh-tw/account/getMailSign",
        sendMail: "/zh-tw/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: 'zh-tw',
      
    });
    
    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: 'zh-tw',
      }
    );
    
  }
  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>