Facebook Pixel

Track browser-side paywall and checkout events from Superwall web paywalls with Facebook Pixel. This integration injects Meta's client-side Pixel script and maps Web2App events to Pixel events.

Use the Facebook Pixel integration to send browser-side events from Superwall web paywalls to Meta. This integration injects the standard Pixel script into the page and maps Web2App events to Meta Pixel events such as ViewContent, InitiateCheckout, and Purchase.

Note: If you need server-side subscription lifecycle events such as renewals, cancellations, expirations, or refunds, use Meta Conversion API instead. That integration is separate from Facebook Pixel.

How this integration works

Superwall exposes Facebook Pixel as a Web2App browser integration. When the integration is enabled:

  • Superwall injects Meta's fbq bootstrap script into the page
  • The Pixel is initialized with your pixelId
  • A PageView event is sent when the script loads
  • Supported paywall and checkout events are forwarded to fbq

This is browser-side tracking for web paywalls. It does not forward subscription lifecycle events from webhooks, and it does not use Meta's Conversion API.

Configuration

The browser integration uses integrationId: "facebook-pixel" with one required field: config.pixelId.

Required setting

FieldDescriptionExample
pixelIdYour Facebook Pixel ID from Meta Events Manager"123456789012345"

Example configuration

{
  "integrationId": "facebook-pixel",
  "config": {
    "pixelId": "123456789012345"
  }
}

In Superwall's generated static web config, the integration is represented like this:

{
  "id": "42",
  "name": "facebook-pixel",
  "enabled": true,
  "type": "integration",
  "integrationId": "facebook-pixel",
  "config": {
    "pixelId": "123456789012345"
  }
}

Getting your Pixel ID

You only need the Pixel ID for this integration.

  1. Go to Meta Events Manager.
  2. Select your Pixel from Data Sources.
  3. Copy the Pixel ID shown at the top of the page.

Script bootstrap

When the integration loads, Superwall injects Meta's standard client-side script into the page:

<script>
  fbq("init", "123456789012345");
  fbq("track", "PageView");
</script>

Superwall also adds Meta's noscript image fallback for the same Pixel ID.

Event mapping

The browser integration maps Web2App events to Pixel events as follows:

Superwall browser eventMeta Pixel eventNotes
paywall_openViewContentIncludes content_name, content_id, and content_type: "paywall"
transaction_startInitiateCheckoutIncludes content_ids and content_type: "product"
transaction_completePurchaseIncludes transaction_id, content_ids, and optional value and currency
paywall_closetrackCustom("PaywallClosed")Custom event with paywall_id
manageLink_clicktrackCustom("ManageLinkClick")Custom event with subscription fields
activateDeviceLink_clicktrackCustom("ActivateDeviceLinkClick")Custom event with subscription fields

Event payload details

Each mapped event sends a small payload based on the browser event data.

paywall_open -> ViewContent

{
  "content_name": "Main paywall",
  "content_id": "paywall_123",
  "content_type": "paywall"
}

transaction_start -> InitiateCheckout

{
  "content_ids": ["com.app.premium.monthly"],
  "content_type": "product"
}

transaction_complete -> Purchase

{
  "transaction_id": "txn_123",
  "content_ids": ["com.app.premium.monthly"],
  "content_type": "product",
  "value": 9.99,
  "currency": "USD"
}

The value and currency fields are only included when they are present in the browser event payload.

paywall_close -> PaywallClosed

{
  "paywall_id": "paywall_123"
}
{
  "subscription_name": "Premium Monthly",
  "subscription_status": "active",
  "redemption_code": "ABC123",
  "provider": "stripe"
}
{
  "subscription_name": "Premium Monthly",
  "redemption_code": "ABC123"
}

Facebook Pixel vs. Meta Conversion API

These integrations are related, but they solve different problems.

IntegrationTracking modeBest forDoes it send renewals, cancellations, and refunds?
Facebook PixelBrowser-sideWeb paywall interactions and checkout flow eventsNo
Meta Conversion APIServer-sideSubscription lifecycle and revenue webhook eventsYes

Use Facebook Pixel when you want client-side behavioral signals from web paywalls. Use Meta Conversion API when you need server-side revenue and subscription lifecycle events.

Testing the integration

Validate the browser-side integration before relying on it in campaigns.

  1. Enable the Facebook Pixel integration with your Pixel ID.
  2. Open a web paywall that uses the integration.
  3. Confirm PageView appears in Meta Events Manager.
  4. Trigger paywall and checkout events.
  5. Verify ViewContent, InitiateCheckout, Purchase, and any custom events appear as expected.

You can also confirm that fbq is loaded in the browser and inspect network requests to Meta while exercising the paywall flow.

Common use cases

Track paywall impressions

Use ViewContent from paywall_open to measure paywall views and build remarketing audiences around paywall engagement.

Track checkout starts

Use InitiateCheckout from transaction_start to see where users begin the purchase flow but do not complete it.

Track completed purchases in the browser

Use Purchase from transaction_complete to capture client-side checkout completion on web paywalls.

Track manage-subscription interactions

Use ManageLinkClick and ActivateDeviceLinkClick to understand how users interact with account and device-link flows.

Troubleshooting

Events are not appearing in Meta

Possible causes:

  • The Pixel ID is incorrect
  • The browser integration is not enabled
  • The page did not load the injected fbq script
  • The paywall flow did not emit the expected browser event

Solutions:

  1. Verify the Pixel ID in Meta Events Manager.
  2. Confirm the integration is enabled for the web paywall flow.
  3. Check that fbq is available in the page.
  4. Inspect the browser console and network requests during the flow.

Purchase is missing value or currency

Possible causes:

  • The transaction_complete event did not include those fields

Solutions:

  • Verify the browser event payload includes value and currency.
  • If you need more complete revenue lifecycle reporting, use Meta Conversion API.

You need renewals, cancellations, or refunds

Facebook Pixel does not send those lifecycle events in this integration.

Use Meta Conversion API for that server-side workflow.

Additional resources

How is this guide?

On this page