Skip to content

Conversation

@shigahi
Copy link
Collaborator

@shigahi shigahi commented Jan 22, 2026

Summary

Add Facebook Pixel integration similar to existing Google Analytics (GA4) support.

Changes

  • Add facebookPixelId to AnalyticsOptions interface in code.ts
  • Add Facebook Pixel script injection in HeadRewriter class
  • Add Facebook Pixel ID input field in Analytics section of the UI

Implementation Details

The Facebook Pixel script is injected into the <head> element when a Pixel ID is configured:

  • Standard Facebook Pixel base code
  • Automatic PageView event tracking
  • <noscript> fallback for non-JavaScript environments

UI Changes

Added "Facebook Pixel ID" input field in Advanced Settings > Analytics section (below GA4 input).

Testing

  • Build passes successfully
  • UI renders correctly with the new input field

Closes #31

- Add facebookPixelId to AnalyticsOptions interface
- Add Facebook Pixel script injection in HeadRewriter
- Add Facebook Pixel ID input field in Analytics section

Closes #31
@shigahi shigahi merged commit d8cd5c8 into master Jan 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Facebook Pixel tracking support

2 participants