# /meta-web-leads

> Creates a complete Meta Web Leads campaign from a Google Slides brief — reads copy, visuals (from Drive gallery), and targeting, then creates a PAUSED campaign optimized for Pixel Lead events on an external landing page.


# Meta Web Leads — Campaign Creator

## When to trigger

- `/meta-web-leads "ACME Agency" "https://docs.google.com/presentation/d/..."` — manual, full run
- `/meta-web-leads` — prompts for client and Slides URL if not provided
- **ClickUp auto-trigger** when a task tagged `claude-code` matches:
  - `web leads`, `website leads`, `pixel leads`, `web oglas landing`, `landing page oglas`
  - Slides URL must be present in the task description

## What this skill does

Reads a Google Slides brief (same format as `/meta-lead-ads`), downloads visuals from a Drive gallery link, uploads assets to Meta, and creates a complete PAUSED campaign optimized for Pixel Lead events pointing to an external landing page. No native Meta lead form is created.

## Key differences from /meta-lead-ads

| | Lead Form | Web Leads |
|---|---|---|
| Destination | Meta native form (ON_AD) | External landing page (WEBSITE) |
| Optimization | LEAD_GENERATION | OFFSITE_CONVERSIONS + Pixel Lead event |
| Pixel needed | No | Yes (from brief or clients.json) |
| Lead form spec slide | Yes | No |
| Landing URL required | No | Yes |

## Google Slides brief format

Same as `/meta-lead-ads` — one slide per ad format. No lead form spec slide needed.

Supported ad types: `SINGLE IMAGE`, `VIDEO`, `CAROUSEL` (same markers as lead form skill).

## ClickUp task format

```
Task name: Pustiti Meta web leads kampanju za <service>
Tag: claude-code
Description:
  https://docs.google.com/presentation/d/PRESENTATION_ID/edit
  Visuals: https://drive.google.com/drive/folders/FOLDER_ID
  Landing: https://prijava.mbdent.com
  Pixel: <id>
  Budget: 15€ dnevno
  Targetujemo cijelu Hrvatsku
  Godine: 30+
```

### Required fields

- **Slides URL** — must be in the task description
- **Landing:** — destination URL (fallback: `clients.json → landing_page → website`)
- **Pixel:** — Meta Pixel ID (fallback: `clients.json → pixel_id` → fetch from ad account; error only if zero pixels)

### Optional fields

- **Visuals:** — Drive folder link with one image per ad slide (sorted by filename, 1:1 match)
- Budget, age, geo — same parsing as `/meta-lead-ads` (defaults: €15/day, 30+, Croatia)

## Pixel ID resolution (priority order)

1. `pixel_id` field in `clients.json`
2. `Pixel:` tag in the ClickUp task description
3. Fetch from ad account via Meta `/adspixels` (only if exactly one — errors if multiple)
4. Error — script stops and tells you what to add

If found via brief or API, the script automatically saves it to `clients.json` for future runs.

## What gets created in Meta

All objects created in **PAUSED** status.

1. **Campaign** — `OUTCOME_LEADS` objective, CBO with parsed budget
2. **Ad set** — `OFFSITE_CONVERSIONS` optimization, Pixel `LEAD` event, `WEBSITE` destination
3. **Ads** — one per slide: single image, video, and/or carousel (`LEARN_MORE` CTA → landing URL)

## How to run

### Direct CLI

```bash
node ACME Agency/scripts/meta_web_leads.mjs \
  --client "ACME Agency" \
  --slides "https://docs.google.com/presentation/d/..." \
  --landing "https://prijava.mbdent.com" \
  --pixel "<id>"
```

### Via ClickUp

Tag a task `claude-code` with the brief format above. The 5x-daily executor cron on your server picks it up.

## Key files

| File | Purpose |
|---|---|
| `ACME Agency/scripts/meta_lead_ads.mjs` | Contains `runMetaWebLeads` export and all shared helpers |
| `ACME Agency/scripts/meta_web_leads.mjs` | Thin CLI wrapper |
| `ACME Agency/scripts/clickup_executor.mjs` | ClickUp handler (`meta_web_leads` type) |
| `ACME Agency/clients/clients.json` | Client registry — `pixel_id`, `landing_page` |

## After the skill runs

1. ACME Agencyw in Ads Manager → activate campaign
2. Verify Pixel fires Lead event on the thank-you page (use Meta Pixel Helper extension)
3. GHL — leads arrive via landing page form (no additional wiring, unlike Meta-native Lead Form campaigns)

## Built by

a teammate (sandbox proposal 2026-05-21). Skill wired in by Faris in the same session — sandbox couldn't write to `.claude/skills/` directly.
