Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMage Facebook Pixel Extension

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

About

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

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages