meta-pixel-setup

ooiyeefei/ccc

Настройка Meta Pixel и отправка конверсионных событий на сайте.

Звёзды501
Форки59
Авторooiyeefei
Обновлённоя 12 2026

Установка

SKILL.md

Meta Pixel Setup

Get the Meta Pixel tracking a real conversion on a website, verified, so Facebook/Instagram ad optimization has something true to learn from. Two things trip people up and this skill front-loads both: the Pixel-vs-Conversions-API decision (Meta's wizard aggressively pushes the heavier one) and which data category to declare (a wrong choice can throttle your ads).

Naming note: Meta renamed "Pixel" to "Dataset" in the UI. A dataset contains the pixel and its Dataset ID = Pixel ID (a ~15–16 digit number). Treat the two words as the same thing.

Start where the user is

Setup is a chain: Facebook Page → Business portfolio → Events Manager → Pixel/Dataset (get the ID) → base code on site → conversion event → verify. People arrive mid-chain. Ask first, then jump in — don't re-create what exists (a business often already has a pixel; reuse it rather than fragmenting data across two).

Ask (adapt to what they've said):

  1. Do you have a Facebook Page and Meta Business Suite / Business portfolio set up already?
  2. Do you already have a Pixel / Dataset (in Events Manager)? If yes, what's the Dataset ID (the ~16-digit number)? Paste it — that may be all that's needed.
  3. What's the one conversion that matters (a lead/waitlist submit, a signup, a purchase)? This is what ads optimize toward.
  4. The site's stack + domain (Next.js, plain HTML, WordPress, Shopify) — decides how the code goes in.

If they already have the Dataset ID and a Page, skip straight to install (§3). Do not walk them back through account creation they've done.

Decision 1: Pixel only, or + Conversions API? (start with Pixel only)

Meta's setup wizard shows "Conversions API and Meta Pixel (Recommended)" with a shiny stat. Don't reflexively take it. Here's the honest trade-off:

  • Meta Pixel (browser) — a code snippet on the site sends events from the visitor's browser. Simple, no backend, works today. This is all you need to launch.
  • Conversions API (CAPI) — your server sends events directly to Meta. It's server-to-server, "developer support required," and to actually help it needs customer PII (email, phone, IP) sent to Meta for matching. That's more build and a bigger privacy/compliance surface (GDPR/PDPA/CCPA).

So: launch with the browser Pixel. Add CAPI later, only if browser signal loss (ad-blockers, iOS ATT) is measurably hurting you and you've resolved the PII/consent question. Treat CAPI as a post-launch optimization, not a setup step. Read references/conversions-api.md before ever wiring it — it exists to stop you sending personal data to Meta by accident.

Decision 2: the Dataset "category" — leave it blank unless it clearly fits

When creating the dataset, Meta asks to "select any applicable categories." This is a trap for finance/health/sensitive products. The dialog warns: "depending on the category and location, data sharing may be limited or blocked." Categories like "Financial service," "Economic vulnerability," "Personal hardship," "Nationality" trigger Meta's restricted-data handling and can throttle or block your ad optimization.

Rule: only tick a category if it accurately and unavoidably describes you, and you understand it restricts data. A budgeting/productivity/SaaS tool is software, not a "financial service" (that category is for lenders, credit reports, consumer finance). When in doubt, leave categories empty (it's optional) — empty means no restriction, which is what a normal waitlist/signup test wants.

1. Create or find the Pixel/Dataset (get the ID)

In Events Manager:

  1. Left rail → Connect data (green +) → Web → Meta Pixel → Connect. (Or if a dataset exists, click it — the ID is right under its name.)
  2. Name it after the business (e.g. "Acme Web"). For category, see Decision 2 (usually leave blank).
  3. Copy the Dataset ID — the ~16-digit number under the name. Also always visible later under Events Manager → Datasets.
  4. If it launches a "set up / connect your website" wizard offering Conversions-API vs Pixel-only — you can close/skip it. You only need the ID; the code goes in by hand (§3). If you do proceed, choose Meta Pixel only (Decision 1).

2. (Optional) Reuse an existing pixel

A pixel is not a hard reporting wall like a GA4 property. One pixel can cover a whole domain — the main app and a /waitlist landing page. Distinguish funnels by the event + custom params (e.g. content_name: 'waitlist'), not by a second pixel. If the business already has one, reuse its ID.

3. Install the base code

Paste in <head> on every page, replacing YOUR_PIXEL_ID. It fires PageView automatically. (Copy your exact snippet from Events Manager — it has the ID pre-filled — or use this canonical form.)

<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
  src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"/></noscript>
<!-- End Meta Pixel Code -->

Do NOT add an integrity/SRI hash — fbevents.js is a versioned loader Meta updates in place and doesn't publish a stable hash for; SRI will break it. Framework-specific install (Next.js next/script, WordPress, Shopify, GTM) is in references/install-by-platform.md.

4. Fire the conversion event on the action

Use a standard event so Meta's optimization and reporting recognize it — Lead (waitlist/contact), CompleteRegistration (signup), Purchase (sale). Full list + when to use each: references/standard-events.md. Fire it only after the action truly succeeded, never on a caught error.

<script>
form.addEventListener('submit', async function (e) {
  e.preventDefault();
  try {
    await saveTheLead(/* ... */);          // 1. persist FIRST — the real success
    if (window.fbq) fbq('track', 'Lead', { // 2. only then, count it (guard for blockers)
      content_name: 'waitlist',            // segmentable, NON-PII params only
      value_bucket: 'high'
    });
    window.location.href = '/thank-you';
  } catch (err) {
    showError('Something went wrong, please try again.');  // no event, no fake success
  }
});
</script>

PII rule — do not send personal data through the browser Pixel

Never pass email, phone, name, or address as event parameters. Send categories/buckets (content_name, a value band, a persona) — enough to segment, not to identify. (The one place Meta does use hashed PII is CAPI's Advanced Matching, which is a deliberate, consented, server-side choice — see references/conversions-api.md, not something to sprinkle into browser events.)

5. Verify BEFORE you spend — the gate

Do a real conversion on the live/preview site, then confirm:

  • Install the Meta Pixel Helper Chrome extension. Load the page → it shows the pixel + PageView. Submit the form → it shows the Lead event with your params.
  • Or Events Manager → your dataset → Test events, enter the site URL, and watch events arrive live.
  • Only fires on success: cause a failure and confirm the event does NOT fire.

Only after you can see the conversion fire correctly should ad budget go live. A miswired conversion makes Meta optimize toward the wrong people and you can't tell from the dashboard. Full checklist: references/verify-checklist.md.

"Can you set this up for me?"

The account/Page/Business-Suite/Pixel creation needs the user's own Meta login — can't be done on their behalf; that's a short UI walk (this skill guides it). Getting the Dataset ID is the user's one job. The assistant can write the base code + event into the site once it has the ID. Split it that way — and steer them away from the CAPI wizard and sensitive categories per the two decisions above.

Reference files

  • references/install-by-platform.md — base-code install for Next.js, HTML, WordPress, Shopify, GTM.
  • references/standard-events.md — Meta standard event names + params for common conversions.
  • references/conversions-api.md — what CAPI is, when it's worth it, and the PII/consent guardrails BEFORE wiring it.
  • references/verify-checklist.md — the pre-spend verification gate (Pixel Helper, Test Events, common failures).

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: meta-pixel-setup](https://darkplay.ru/ai/skills/ooiyeefei-ccc-meta-pixel-setup)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

Django Build Resolveraffaan-m · Специалист по ошибкам Django: pip/Poetry, миграции, импорты, collectstatic.
225 587 ★
Docs Lookupaffaan-m · Получает актуальную документацию и примеры кода через Context7 MCP для вопросов по API и…
225 587 ★
Opensource Packageraffaan-m · Готовит open-source упаковку: CLAUDE.md, README, LICENSE, CONTRIBUTING и шаблоны.
225 587 ★
Seo Specialistaffaan-m · SEO-специалист: технический аудит, оптимизация страниц, структурированные данные, Core…
225 587 ★
Spec Mineraffaan-m · Извлекает поведенческие спецификации из кода для OpenSpec в виде блоков Requirement и…
225 587 ★
hyperframesheygen-com · Все навыки HyperFrames в одном статическом наборе. В большинстве случаев лучше…
27 комп.
ruflo-metaharnessruvnet · Интеграция MetaHarness: доступ к score/genome/mint/mcp-scan/threat-model через навыки…
240 комп.
Requirement Parsershanraisshan · Анализирует описания запросов функций и извлекает требования, цели, ограничения и…
61 912 ★
amazon-location-serviceanthropics · Помогает разработчикам добавлять карты, поиск мест, геокодирование, маршрутизацию и…
100 комп.
aws-startup-advisoranthropics · Персонализированные рекомендации по архитектуре, затратам, безопасности и миграции для…
100 комп.

Лучшие ИИ-инструменты для программирования

ИИ для программирования

Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные

GenAPIGenapi
По запросу
5.0
Notepad++ AINotepad-plus-plus
По запросу
4.9
GitHub CopilotGitHub
По подписке
4.9
Creatium MaxCremax
По запросу
4.8
Emacs AIGnu
По запросу
4.8
KiteKite
По запросу
4.8
Amazon Q DeveloperAmazon
По запросу
4.8
VECTA
Есть бесплатный тариф
4.8
SoftPractice
Есть бесплатный тариф
4.8
VibeForge
Есть бесплатный тариф
4.7

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8