SalesCal Docs
Integrations

Meta Pixel Integration

Track booking funnel events to Meta Ads, with browser pixel + Conversions API for accurate attribution.

Benefits

  • Funnel tracking: PageView, lead capture, qualification, and booking events sent to Meta
  • Server-side conversions (CAPI): funnel events report reliably even with ad blockers or iOS privacy features, because they never depend on the browser pixel
  • Hashed PII: Email, phone, and name are SHA-256 hashed before they leave your team's server
  • Customizable event names: Map SalesCal events to Meta's standard events (Lead, Schedule) or your own custom event names
  • Per-form exclusion: Opt specific booking pages out of pixel tracking when you don't want them in your ad data

How the Pixel Works

SalesCal fires Meta events two complementary ways:

  1. Browser pixel — the Meta fbevents.js script loads on your public booking page and fires the page-view event
  2. Conversions API (CAPI) — every funnel event (lead capture, qualification, booking) is sent server-side from a SalesCal edge function, carrying SHA-256-hashed prospect details (email, phone, name, location) plus the IP address, user agent, and Meta's click and browser ids

Funnel events are server-only on purpose: exactly one copy per event, always carrying the fullest match data, unaffected by ad blockers or browser privacy features, and with no dependence on a race between duplicate events (Meta deduplicates by event_id but keeps only the first copy it receives — it never merges). Page views still fire from the browser so Meta's session tooling, like the Test Events tab, can see the visit.

Connecting a Pixel

  1. Go to Settings > Integrations
  2. Find Meta Pixel and click Connect
  3. The "Add Meta Pixel" dialog appears. Fill in:
    • Pixel Name — a label for your own reference (e.g. "Q2 Campaign Pixel")
    • Pixel ID (Dataset ID) — the 15–18 digit ID from Meta Events Manager
    • CAPI Access Token — generate this in Meta Events Manager → Settings → Conversions API
  4. Click Add Pixel

After the first pixel is saved, manage everything else from Settings > Integrations > Meta Pixel.

Where to find your Pixel ID and access token

In Meta Events Manager:

  • Pixel ID: top of your dataset settings — labeled "Dataset ID"
  • CAPI Access Token: Settings tab → Conversions APIGenerate Access Token. Treat this like a password — anyone with it can write events to your pixel.

Events SalesCal Tracks

SalesCal triggerDefault Meta eventWhen it fires
page_viewViewContentA prospect lands on a public booking page
potentialLeadContact info captured on the booking form (fires once per lead — see below)
qualifiedSubmitApplicationForm passes qualification rules
bookedScheduleMeeting time confirmed

When the Lead event fires

The potential trigger fires once per lead, with the most complete contact data available. When a prospect completes the email step, SalesCal waits up to 60 seconds for a phone number before sending the event:

  • Phone captured within the window → one Lead event including the phone
  • No phone within 60 seconds → one Lead event with email only
  • Prospect leaves the page during the window → the event sends immediately with whatever was captured
  • The form has no phone field → the event sends as soon as the email is captured

A phone number added after the Lead event has gone out doesn't re-fire it — Meta would discard a duplicate rather than merge it — but the phone still reaches Meta on the later qualified and booked events.

Each event has two modes:

  • Meta standard event — map to one of Meta's predefined events (Lead, Schedule, Purchase, etc.). Use this for ad optimization where standard events have first-class support
  • Custom event — fire your own event name (e.g. "SalesCal_Lead"). Use this when you need separate data streams from other pixels firing similar events

Configuration lives at Settings > Integrations > Meta Pixel — pick the mode and event name per trigger.

Per-Form Exclusion

By default, every booking page fires the pixel. If you have internal or test forms that shouldn't pollute your ad data, exclude them:

  1. Open the booking event in the dashboard
  2. The exclusion list is team-wide — managed alongside other meta-pixel settings
  3. Excluded events still book normally; they just don't fire the pixel

This is useful for staging events, internal sales-team links, or low-quality channels you don't want optimizing against.

What CAPI Sends

For each event, the server-side CAPI call includes:

FieldValue
emSHA-256(lowercase trimmed email)
phSHA-256(digits-only phone)
fn / lnSHA-256(lowercase trimmed first/last name)
ct / stSHA-256(lowercase city / state, no spaces)
countrySHA-256(2-letter ISO code)
external_idSHA-256(SalesCal lead UUID)
client_ip_addressProspect's IP from the booking request
client_user_agentBrowser user-agent string
fbc / fbpMeta's click ID and browser ID cookies if present

PII fields are hashed in your team's server before transit. Meta receives only the hashes, which it matches against its own hashed user graph for attribution.

Test Events

There are two ways to verify a pixel, both using the Test Event Code from Meta Events Manager's Test Events tab.

Quick check: send a sample event

  1. Go to Settings > Integrations > Meta Pixel
  2. Open the menu on the pixel and choose Test Pixel
  3. Paste the Test Event Code and click Send Test Event

SalesCal fires a single server-side event carrying that code, and it appears in the Test Events tab within a few seconds. The test event carries a full sample set of match fields — email, phone, first and last name, city, region, country, IP address, and browser user agent — so you can confirm every advanced-matching parameter arrives in Meta exactly as live booking events send them.

Full walkthrough: test a real booking

To watch a complete booking flow — browser and server events side by side, exactly as live traffic behaves — open your booking page with ?meta_test_code=YOURCODE added to the URL:

https://yourcompany.salescal.site/book-a-call?meta_test_code=TEST12345

Every server event fired from that browser tab then carries your test code and shows in the Test Events tab (alongside the page-view browser event). Only your own tab is affected — other visitors' events keep reporting normally — and the test session ends when you close the tab. (A walkthrough still creates a real lead and booking, so cancel it afterwards.)

Test mode is never saved anywhere: the dialog send is one-shot and the URL flag lives only in your own browser tab. Live traffic keeps flowing to normal reporting the whole time, and there's nothing to switch off afterwards.

Troubleshooting

"No events showing up in Events Manager"

  • Confirm the Pixel ID matches your dataset (not your old pixel from a different campaign)
  • Check the CAPI Access Token — regenerating one in Meta will silently invalidate the previous token
  • Look at the Sync Log tab if visible — disabled triggers no-op silently and won't error

"Browser pixel fires but CAPI doesn't"

  • The CAPI Access Token is missing or expired — re-enter it
  • Your edge function logs (Supabase) will show the actual error from Meta

"Events fire but Meta says 'no match'"

Meta needs at least one user identifier to match. Make sure the booking form captures email or phone, otherwise CAPI sends an event with no matchable PII.

"Wrong events firing on a page"

Check the per-event mode and event-name configuration — a "Custom event" mode with a typo'd name will fire successfully but show up as a custom event in Meta rather than as Lead/Schedule/etc.

Disconnecting

  1. Go to Settings > Integrations > Meta Pixel
  2. Click the delete icon next to the pixel
  3. Confirm

The pixel record is removed and tracking stops immediately. Events already in Meta are not deleted — that's a Meta-side cleanup.

Privacy & Security

  • The CAPI Access Token is stored encrypted at rest
  • Prospect identifiers are SHA-256 hashed on the server before they reach Meta; the browser pixel only fires the page view and carries no personal details
  • Per-form exclusion lets you keep regulated forms (e.g. healthcare, financial) out of ad tracking
  • Trigger logs are pruned after 30 days

Multiple Pixels

You can connect more than one Meta Pixel per team. All active pixels fire on every event (subject to per-form exclusion). Use this when:

  • You run multiple ad accounts and need attribution in each
  • You're migrating from one pixel to another and want overlap during the cutover