PHPackages                             revoltify/pixelify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. revoltify/pixelify

ActiveLibrary[API Development](/categories/api)

revoltify/pixelify
==================

Laravel package for Facebook Conversion API integration

2.1.0(4mo ago)6145—10%3MITPHPPHP ^8.2CI passing

Since Feb 2Pushed 4mo agoCompare

[ Source](https://github.com/revoltify/pixelify)[ Packagist](https://packagist.org/packages/revoltify/pixelify)[ RSS](/packages/revoltify-pixelify/feed)WikiDiscussions 2.x Synced 4w ago

READMEChangelog (3)Dependencies (14)Versions (6)Used By (0)

Pixelify - Facebook Conversion API Integration for Laravel
==========================================================

[](#pixelify---facebook-conversion-api-integration-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5072ea9a4bebde9972decbecb8bd4a4e29bd909f7449921e1b8119ebc4ae9185/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265766f6c746966792f706978656c6966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/revoltify/pixelify)[![Total Downloads](https://camo.githubusercontent.com/e2c4d81504e9d108ba8964be9f797b464cab255274c3b6dfd2d09c5d8188ced5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7265766f6c746966792f706978656c6966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/revoltify/pixelify)[![Tests](https://camo.githubusercontent.com/273ad198ba10a59e625099b05d3022303c5d1d27dd9c9bf93eb0cf1557e566c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7265766f6c746966792f706978656c6966792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/revoltify/pixelify/actions/workflows/run-tests.yml)[![PHP 8.2+](https://camo.githubusercontent.com/5cd2a39d1d0beacbcbe9edc115d0c0bb5fcdbd6f629bb5dc8ae094f318715a25/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242342e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/8c935b1df6fd134b39f520af546bc222524c275dbb0a3486f3802b8bda1bcd05/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312532422d4646324432302e7376673f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://laravel.com)

A Laravel package for easy integration with Facebook Conversion API to track various events like ViewContent, PageView, AddToCart, InitiateCheckout, and Purchase.

Installation
------------

[](#installation)

**For Laravel 11+**

```
composer require revoltify/pixelify "^2.0"
```

**For Laravel 9+**

```
composer require revoltify/pixelify "^1.0"
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan pixelify:setup
```

Add your Facebook Pixel credentials to your `.env` file:

```
FACEBOOK_PIXEL_ID=your_pixel_id
FACEBOOK_CONVERSION_API_TOKEN=your_api_token
FACEBOOK_TEST_EVENT_CODE=your_test_event_code (optional)
FACEBOOK_PIXEL_DEBUG=false
```

#### Getting Your Facebook Pixel ID and Access Token

[](#getting-your-facebook-pixel-id-and-access-token)

1. Go to [Facebook Events Manager](https://business.facebook.com/events_manager)
2. Select your Pixel
3. Go to the "Settings" tab
4. Copy the Dataset ID (this is your Pixel ID)
5. Scroll down to "Set up direct integration"
6. Click "Generate access token"
7. Copy the generated Pixel Access Token

Usage
-----

[](#usage)

### Model Integration

[](#model-integration)

Implement the interfaces in your models:

```
use Revoltify\Pixelify\Contracts\PixelifyUserInterface;
use Revoltify\Pixelify\Traits\HasPixelifyUser;

class User extends Model implements PixelifyUserInterface
{
    use HasPixelifyUser;

    // overwrite methods if needed
    public function getPixelFirstName(): ?string
    {
        return $this->name;
    }
}

use Revoltify\Pixelify\Contracts\PixelifyProductInterface;
use Revoltify\Pixelify\Traits\HasPixelifyProduct;

class Product extends Model implements PixelifyProductInterface
{
    use HasPixelifyProduct;

    // overwrite methods if needed
    public function getPixelProductCurrency(): string
    {
        return $this->product_currency;
    }
}
```

### Tracking Events

[](#tracking-events)

```
use App\Models\User;
use App\Models\Product;
use Revoltify\Pixelify\Facades\Pixelify;

$user = User::first();
$product = Product::first();

// Track page view
Pixelify::pageView($user);

// Track view content
Pixelify::viewContent($product, $user);

// Track add to cart
Pixelify::addToCart($product, $user);

// Track initiate checkout
Pixelify::initiateCheckout($product, $user);

// Track purchase
Pixelify::purchase($product, $user);
```

### Using DTOs Directly

[](#using-dtos-directly)

You can also create DTOs manually:

```
use Revoltify\Pixelify\DTO\UserData;
use Revoltify\Pixelify\DTO\ProductData;
use Revoltify\Pixelify\Facades\Pixelify;

$userData = new UserData(
    firstName: 'John',
    lastName: 'Doe',
    email: 'user@example.com',
    phone: '+1234567890',
);

$productData = new ProductData(
    productId: '123',
    price: 99.99,
    quantity: 1,
    currency: 'USD'
);

Pixelify::purchase($productData, $userData);
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Thank you for considering contributing to the Pixelify package! We welcome all contributions, including bug reports, feature requests, and pull requests.

Please review existing issues and pull requests before submitting your own to avoid duplicates.

If you discover any security-related issues, please email `info@revoltify.net` directly instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance77

Regular maintenance activity

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~106 days

Total

5

Last Release

126d ago

Major Versions

1.x-dev → 2.0.02026-03-02

PHP version history (2 changes)1.0.0PHP ^8.0.2

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a6975c50488b3eeb7cb613bf0b280342ce3912dc4ffaa1aa14b75add8fe070a?d=identicon)[rtraselbd](/maintainers/rtraselbd)

---

Top Contributors

[![rtraselbd](https://avatars.githubusercontent.com/u/31556372?v=4)](https://github.com/rtraselbd "rtraselbd (20 commits)")[![zambodaniel](https://avatars.githubusercontent.com/u/3462880?v=4)](https://github.com/zambodaniel "zambodaniel (5 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/revoltify-pixelify/health.svg)

```
[![Health](https://phpackages.com/badges/revoltify-pixelify/health.svg)](https://phpackages.com/packages/revoltify-pixelify)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

818336.8k3](/packages/defstudio-telegraph)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

58174.6k18](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5222.6k](/packages/simplestats-io-laravel-client)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
