PHPackages                             ideacrafters/laravel-pixels-manager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ideacrafters/laravel-pixels-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ideacrafters/laravel-pixels-manager
===================================

The Laravel Pixel Manager is a comprehensive package designed to simplify the integration and management of multiple advertising platform pixels (Facebook, TikTok, Snapchat, Pinterest, Twitter/X) in Laravel applications

1.1.0(2mo ago)0230[1 PRs](https://github.com/IdeaCraftersHQ/laravel-pixels-manager/pulls)MITPHPPHP ^8.3CI passing

Since Oct 27Pushed 1mo agoCompare

[ Source](https://github.com/IdeaCraftersHQ/laravel-pixels-manager)[ Packagist](https://packagist.org/packages/ideacrafters/laravel-pixels-manager)[ Docs](https://github.com/ideacrafters/laravel-pixels-manager)[ GitHub Sponsors](https://github.com/ideacrafters)[ RSS](/packages/ideacrafters-laravel-pixels-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (24)Versions (8)Used By (0)

Laravel Pixel Manager
=====================

[](#laravel-pixel-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/19660fe291447eff6796b86639a42c313a4ab2c511dd20f7abd8ebe99ad5851a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6964656163726166746572732f6c61726176656c2d706978656c732d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideacrafters/laravel-pixels-manager)[![GitHub Tests Action Status](https://camo.githubusercontent.com/6236d556a6800b41a73e69b4694518289a925bbab640fbb86e199ff997a3a61f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6964656163726166746572732f6c61726176656c2d706978656c732d6d616e616765722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ideacrafters/laravel-pixels-manager/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bfaad31adb01ea55ea82b5f809b4b983d7432229fd4c32340dd244cfa82f4ea7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6964656163726166746572732f6c61726176656c2d706978656c732d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideacrafters/laravel-pixels-manager)

A unified package for managing multiple advertising platform pixels (Facebook, TikTok, Snapchat) in Laravel applications with server-side conversion tracking.

Features
--------

[](#features)

- 📊 **Multi-Platform Support**: Built-in support for Facebook, TikTok, and Snapchat
- 🎯 **Selective Targeting**: Target specific platforms or pixels for each event
- 🔄 **Queue-Based Processing**: Zero performance impact with async event processing
- 🔒 **Secure Credentials**: AES-256 encryption for access tokens
- 🛡️ **GDPR/CCPA Compliant**: Built-in consent management
- 📝 **Blade Directives**: Easy-to-use directives for script injection
- ⚡ **Smart Deduplication**: Prevent duplicate events with cache-based deduplication

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

[](#installation)

You can install the package via composer:

```
composer require ideacrafters/laravel-pixels-manager
```

Run the installation wizard:

```
php artisan pixel:install
```

Add your first pixel:

```
php artisan pixel:add
```

Usage
-----

[](#usage)

### Basic Tracking

[](#basic-tracking)

Track events across all configured platforms:

```
use Ideacrafters\PixelManager\Facades\PixelManager;

PixelManager::track('Purchase', [
    'value' => 99.99,
    'currency' => 'USD',
]);
```

### Selective Tracking

[](#selective-tracking)

Track to specific platforms:

```
PixelManager::forPlatforms('facebook', 'tiktok')
    ->track('ViewContent', [
        'content_id' => 'SKU123',
        'value' => 29.99,
    ]);
```

Track to specific pixels:

```
PixelManager::forPixels(1, 3)
    ->track('AddToCart', [
        'content_id' => 'SKU123',
        'value' => 29.99,
    ]);
```

Exclude platforms:

```
PixelManager::except('snapchat')
    ->track('PageView');
```

### Blade Directives

[](#blade-directives)

Add to your layout's `` section:

```

    @pixels

```

Load specific platforms:

```
@pixels('facebook', 'tiktok')
```

Add noscript fallbacks:

```

    @pixelsNoscript

```

### Model Integration

[](#model-integration)

Add the `TrackableEvents` trait to your User or Order model:

```
use Ideacrafters\PixelManager\Traits\TrackableEvents;

class User extends Authenticatable
{
    use TrackableEvents;
}
```

Now track events directly on your models:

```
$user->trackPurchase(99.99, 'USD');
$user->trackAddToCart($product->id, $product->price);
$user->trackViewContent($product->id, $product->name, $product->price);
```

Artisan Commands
----------------

[](#artisan-commands)

```
# Install and setup
php artisan pixel:install

# Add a new pixel
php artisan pixel:add

# Test a pixel configuration
php artisan pixel:test {id}
```

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

[](#configuration)

The configuration file includes:

- Platform adapter mappings
- Queue connection settings
- Deduplication settings
- Standard event definitions
- Cache configuration

See `config/pixels-manager.php` for all available options.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 9.0
- Queue driver: Redis (recommended) or Database
- Cache driver: Redis (recommended) or Memcached

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

- AES-256 encryption for credentials stored in database
- SHA-256 hashing for PII (emails, phones) before sending
- HTTPS-only API communication
- Input validation and sanitization
- GDPR/CCPA consent management

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Amar Neche](https://github.com/)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance88

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~44 days

Total

4

Last Release

63d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fccd459a4d7a226025511ed967a180d8e259dfd41d3077a4f4b43b63e0a8be6?d=identicon)[monaam\_ic](/maintainers/monaam_ic)

---

Top Contributors

[![amarneche](https://avatars.githubusercontent.com/u/47366103?v=4)](https://github.com/amarneche "amarneche (10 commits)")[![y-boudehane](https://avatars.githubusercontent.com/u/109896280?v=4)](https://github.com/y-boudehane "y-boudehane (5 commits)")[![BitI3yBit](https://avatars.githubusercontent.com/u/158774004?v=4)](https://github.com/BitI3yBit "BitI3yBit (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelideacrafterslaravel-pixels-manager

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ideacrafters-laravel-pixels-manager/health.svg)

```
[![Health](https://phpackages.com/badges/ideacrafters-laravel-pixels-manager/health.svg)](https://phpackages.com/packages/ideacrafters-laravel-pixels-manager)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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