meta-capi-and-events

Skill for integrating Meta Conversion API and configuring funnel events. Used to feed MQL/SQL signals back to Meta so Meta optimizes for qualified opportunities rather than just form submissions.

Last repository push
GitHub Stars
247
Forks
109
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "meta-capi-and-events" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-23bb020e2584883c1c79613fb13aed21504f773c1fb78e74ae13b65ad4112e9e. Verify the upstream source and version against https://github.com/swan-gtm/gtm-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Skill for integrating Meta Conversion API and configuring funnel events. Used to feed MQL/SQL signals back to Meta so Meta optimizes for qualified opportunities rather than just form submissions.

0 Downloads

Introduction source: third_party · swan-gtm · 0.0.1 Reference

SkillPi interpretation

Tasks
Use this skill when wiring the Conversions API and funnel events — feeding MQL/SQL signal back so Meta optimizes for qualified pipeline, not form-fills.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "meta-capi-and-events"
title: "Meta Conversions API & events"
description: "Use this skill when wiring the Conversions API and funnel events — feeding MQL/SQL signal back so Meta optimizes for qualified pipeline, not form-fills."
category: Ads

Meta Conversions API (CAPI) & Events - B2B SaaS

Best practices for sending conversion data to Meta via the Conversions API: event hierarchy, CRM vs middleware, deduplication, and Event Match Quality. Use this when setting up or auditing CAPI, choosing between HubSpot native and n8n, or improving event match quality.


Best Option for B2B SaaS: CRM to CAPI (with Pixel)

  • Source of truth: Your CRM (HubSpot, Salesforce, etc.).
  • Conversion events: CRM lifecycle stages (Lead, MQL, Opportunity, Customer), not only a single "Lead" from the site.
  • Sending: Server-side via Conversions API from the CRM (or from a system that has the same CRM data).
  • Redundancy: Use both the Meta Pixel (browser) and CAPI (server) for the same conversion where possible, with deduplication so Meta counts it once.

This gives optimization on real pipeline (opportunity/customer), resilience to iOS/ad blockers, and a proper offline conversion loop: Meta lead to CRM to stage changes to CAPI back to Meta.


Recommended Event Hierarchy (B2B SaaS)

Event (example) When to send Why
Lead (or initial_lead) Contact enters "Lead" / first form or demo Top-of-funnel volume
marketingqualifiedlead Contact becomes MQL Qualified intent
opportunity Deal/opportunity created Pipeline; strong optimization target
customer Closed-won Revenue; best for value optimization

Send one CAPI event per lifecycle stage you care about. Set conversion event priority in Events Manager so the event you optimize for (e.g. Lead or Opportunity) ranks above PageView and other events.


Where to Send From: Best vs Second Best

Option When it's best
CRM native (e.g. HubSpot to Meta) You want one place to manage sync. Data sharing (Email, Phone, Click ID) is on for all lifecycle events and Event Match Quality is acceptable (e.g. 6+/10). You only need Meta (and maybe other native integrations). No custom logic required.
n8n (or similar) between CRM and Meta Event Match Quality stays low despite HubSpot data sharing. You need normalize + hash per Meta's spec (SHA-256, E.164 phone, etc.). You need to send to multiple destinations (Meta + LinkedIn, Google, Segment). You need custom logic (e.g. only send when deal value > X, or only for paid-source contacts). You want one event_id for pixel + CAPI and full control over deduplication. Compliance: you want to hash in middleware and never send plain PII.

Order of preference: (1) Native HubSpot to Meta with Data sharing on for all events. (2) If match quality stays low or you need custom logic/multi-destination/hashing control, add n8n (or Segment, or custom backend): CRM to n8n to normalize + hash to CAPI.


When n8n Is Better Than HubSpot Native

  • Low Event Match Quality even with HubSpot data sharing on - n8n lets you normalize and hash exactly per Meta's spec.
  • Multiple destinations - One workflow: HubSpot to n8n to Meta CAPI + LinkedIn, Google, etc.
  • Custom event mapping or filtering - e.g. only send when deal value > X, or only contacts from paid campaigns.
  • Same event_id for pixel + CAPI - Full control for deduplication when the pixel fires with a known event_id and you want CAPI to send the same one.
  • Compliance / data control - Hash in n8n, filter by consent, suppress segments before sending.

Deduplication: Where It Happens

  • Where: In Meta's systems. You don't configure dedup in HubSpot or n8n; you send the right identifiers.
  • How: Send the same event_id (and same event_name) from both the pixel (e.g. on thank-you page) and CAPI (from CRM or n8n when that conversion is recorded). Meta merges them into one conversion.
  • If the conversion only exists in the CRM (e.g. "became Opportunity" days later), you only send CAPI - no pixel event to dedupe with.

Event Match Quality (EMQ)

  • Send user_data with every CAPI event: at least email and phone (normalized, then hashed per Meta's rules). Optionally: first name, last name, city, state, zip, country, external_id (your CRM ID, hashed).
  • HubSpot: Use "Data sharing" and select Email, Phone, Click ID (and any other recommended fields) for all lifecycle events.
  • n8n: Use normalize + hash (Crypto node or Code node with crypto.createHash('sha256').update(str).digest('hex')) so every event includes hashed em, ph, etc. Meta expects hex (lowercase).
  • Check Event Match Quality in Events Manager; aim for 6+/10 or "Good." Low scores (e.g. 3.2-3.8) mean Meta can't match well - improve user_data or add hashing via n8n.

Meta CAPI Best Practices (Summary)

  • Pixel + CAPI for the same events (redundant setup).
  • Deduplication: same event_name + event_id (or external_id + fbp) from pixel and CAPI.
  • Parameters: Send required (e.g. action_source, event_source_url, client_user_agent for web) and recommended customer information (em, ph, fn, ln, etc.) - hashed where required.
  • Real time: Send events as soon as the stage changes (or at least daily).
  • Test: Use Meta's Test Events tool and Payload Helper to validate.
  • Post-setup: Check Event Match Quality; avoid changing pixels or campaign structure unnecessarily during learning.

Related Files

  • meta-setup-and-tracking.md - Pixel, events, domain verification, first campaign
  • audience-strategy.md - Prospecting audiences, data hierarchy
  • campaign-structure.md - Remarketing vs prospecting, ABO/CBO/Advantage+
  • optimization-playbook.md - Decision trees, weekly cadence, scaling protocol

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供 B2B SaaS 场景下 Meta CAPI 的完整实施框架
  • 明确区分 CRM 原生集成与 n8n 中间件的适用边界
  • 解决广告主从表单提交转向合格商机优化的核心痛点
Trigger Precision95/100

Highlights

  • description 精准描述使用场景:CAPI 对接与漏斗事件设置
  • 覆盖多种变体:配置审计、数据源选择、EMQ 优化
  • 边界清晰,不易误触
Structure and Standards95/100

Highlights

  • 模块化结构清晰:最佳实践、事件层级、发送源选择、去重机制
  • 包含端到端示例和对比表格
  • frontmatter 完整,文档长度适中
Execution Reliability93/100

Highlights

  • 参数说明准确:event_id 去重、SHA-256 哈希规范
  • 覆盖主要异常场景:低 EMQ 处理、多目的地同步
  • 提供测试验证建议和变更控制提醒
Evidence Verifiability (mean of the first four)94/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.