empiricompany/openmage-facebook-pixel

OpenMage module for Meta Pixel (Facebook Pixel) integration with automatic e-commerce event tracking and advanced matching.

Maintainers

Package info

github.com/empiricompany/openmage-facebook-pixel

Type:magento-module

pkg:composer/empiricompany/openmage-facebook-pixel

Transparency log

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.4 2026-08-01 09:15 UTC

This package is auto-updated.

Last update: 2026-08-01 09:20:53 UTC


README

OpenMage module for Meta Pixel (Facebook Pixel) integration with automatic e-commerce event tracking and Advanced Matching.

Platform compatibility: this module is compatible with both OpenMage and MahoCommerce.

What It Does

This module automatically tracks e-commerce events on your OpenMage store and sends them to Meta Pixel:

  • PageView: Tracks every page view
  • ViewContent: Tracks when customers view product pages
  • AddToCart: Tracks when customers add products to cart
  • InitiateCheckout: Tracks when customers start the checkout process
  • Purchase: Tracks completed orders

Optional Advanced Matching sends hashed customer email data for improved tracking accuracy.

Events Tracked

Event Trigger Parameters
PageView Every page
ViewContent Product page content_ids, content_type, contents, value, currency
AddToCart Add to cart action content_ids, content_type, contents, value, currency
InitiateCheckout Checkout page content_ids, contents, num_items, value, currency
Purchase Order success page content_ids, content_type, contents, value, currency

For complete parameter details: Meta Pixel Standard Events

Advanced Matching

The module sends the customer's email (em) for Advanced Matching.

In Auto mode (default), the Pixel SDK hashes the email automatically using SHA-256 before transmission. In Hashed mode, the email is pre-hashed server-side and never appears in plain text in the HTML source.

Data Source Priority

Customer email is retrieved from three sources:

  1. Logged-in customer — from customer session
  2. Guest in checkout — from the checkout quote
  3. Guest after purchase — from the completed order

Modes

Mode Description
Auto (default) Passes normalized lowercase email. The Pixel SDK hashes it automatically.
Hashed Pre-hashes email server-side with SHA-256. Email never appears in plain text in the HTML source.

References

Installation

Via Composer

composer require empiricompany/openmage-facebook-pixel

Via Modman

modman clone https://github.com/empiricompany/openmage-facebook-pixel.git

Manual Installation

Copy the contents of app/ folder to your OpenMage installation's app/ folder:

cp -r app/* /path/to/openmage/app/

Then clear cache:

rm -rf /path/to/openmage/var/cache/*

Configuration

  1. Go to Admin Panel → System → Configuration → Facebook → Facebook Pixel
  2. Enable the module
  3. Enter your Meta Pixel ID (you can find it in Meta Events Manager)
  4. Optionally enable Advanced Matching for better tracking accuracy
  5. Choose Advanced Matching Mode: Auto (recommended) or Hashed
  6. Optionally enable Debug Mode to log tracking data
immagine

Testing