PHPackages                             snowsoft/laravel-facebook-pixel - 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. snowsoft/laravel-facebook-pixel

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

snowsoft/laravel-facebook-pixel
===============================

Facebook Pixel integration for Laravel

v0.01(3y ago)026↓100%MITPHPPHP ~7.1|^8.0|^8.2

Since Feb 28Pushed 3y agoCompare

[ Source](https://github.com/snowsoft/laravel-facebook-pixel)[ Packagist](https://packagist.org/packages/snowsoft/laravel-facebook-pixel)[ Docs](https://github.com/snowsoft/laravel-facebook-pixel)[ RSS](/packages/snowsoft-laravel-facebook-pixel/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

this package is no longer updated
=================================

[](#this-package-is-no-longer-updated)

Facebook Pixel integration for Laravel
======================================

[](#facebook-pixel-integration-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1bde8cf18ae4de3ac103c23c438043f8f72601ab57747a8c8c9adc1384f6ef5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765626c6167656e63652f6c61726176656c2d66616365626f6f6b2d706978656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/weblagence/laravel-facebook-pixel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/5c3802b860cadff69e3d241a3e291e6b21f1f2df98611346b405b47015913316/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7765626c6167656e63652f6c61726176656c2d66616365626f6f6b2d706978656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/weblagence/laravel-facebook-pixel)[![Total Downloads](https://camo.githubusercontent.com/24e92daa21fa4696af3892c849732de40d1e64dc31b87c4de6e9021fd6fb62af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765626c6167656e63652f6c61726176656c2d66616365626f6f6b2d706978656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/weblagence/laravel-facebook-pixel)

An easy Facebook Pixel implementation for your Laravel application.

Facebook Pixel
--------------

[](#facebook-pixel)

The Facebook pixel is a snippet of JavaScript code that allows you to track visitor activity on your website. It works by loading a small library of functions which you can use whenever a site visitor takes an action (called an event) that you want to track (called a **conversion**). [Tracked conversions](https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking) appear in the [Facebook Ads Manager](https://www.facebook.com/adsmanager) and in the [Facebook Analytics](https://business.facebook.com/analytics) dashboard, where they can be used to measure the effectiveness of your ads, to define [custom audiences](https://developers.facebook.com/docs/facebook-pixel/implementation/custom-audiences) for ad targeting, for [dynamic ads](https://developers.facebook.com/docs/facebook-pixel/implementation/dynamic-ads) campaigns, and to analyze that effectiveness of your website's conversion funnels.

For concrete examples of what you want to send throught the [Standard Events](https://developers.facebook.com/docs/facebook-pixel/reference#events)

Install
-------

[](#install)

You can install the package via Composer:

```
composer require snowsoft/laravel-facebook-pixel
```

In Laravel 5.5 and up, the package will automatically register the service provider and facade

In L5.4 or below start by registering the package's the service provider and facade:

```
// config/app.php

'providers' => [
    ...
    WebLAgence\LaravelFacebookPixel\LaravelFacebookPixelServiceProvider::class,
],

'aliases' => [
    ...
    'LaravelFacebookPixel' => WebLAgence\LaravelFacebookPixel\LaravelFacebookPixelFacade::class,
],
```

Next, publish the config file:

```
php artisan vendor:publish --provider="WebLAgence\LaravelFacebookPixel\LaravelFacebookPixelServiceProvider"
```

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

[](#configuration)

The configuration file is fairly simple.

```
return [

    /*
     * The Facebook Pixel id, should be a code that looks something like "XXXXXXXXXXXXXXXX".
     */
    'facebook_pixel_id' => '',

    /*
     * Use this variable instead of `facebook_pixel_id` if you need to use multiple facebook pixels
     */
    'facebook_pixel_ids' => [],

    /*
     * Enable or disable script rendering. Useful for local development.
     */
    'enabled'           => true,
];
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

First you'll need to include Facebook Pixel's script. Facebook's docs recommend doing this right after the body tag.

```
{{-- layout.blade.php --}}

    @include('facebook-pixel::head')
    {{-- ... --}}

    @include('facebook-pixel::body')
    {{-- ... --}}

```

### Send pixel

[](#send-pixel)

At any moment, you can use the next function to create a [Standard Event](https://developers.facebook.com/docs/facebook-pixel/reference#events)

```
\LaravelFacebookPixel::createEvent($eventName, $parameters = []);

```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

1118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82e2e5c31874e6660f06e56f1bf60eebc23db8b6ef8e719e9f52ae6db07f90e3?d=identicon)[snowsoft](/maintainers/snowsoft)

---

Top Contributors

[![snowsoft](https://avatars.githubusercontent.com/u/4568234?v=4)](https://github.com/snowsoft "snowsoft (2 commits)")[![liepumartins](https://avatars.githubusercontent.com/u/2070205?v=4)](https://github.com/liepumartins "liepumartins (1 commits)")[![mmubasharsheikh](https://avatars.githubusercontent.com/u/11888803?v=4)](https://github.com/mmubasharsheikh "mmubasharsheikh (1 commits)")

---

Tags

laravelfacebook pixelweblagencelaravel-facebook-pixel

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/snowsoft-laravel-facebook-pixel/health.svg)

```
[![Health](https://phpackages.com/badges/snowsoft-laravel-facebook-pixel/health.svg)](https://phpackages.com/packages/snowsoft-laravel-facebook-pixel)
```

###  Alternatives

[weblagence/laravel-facebook-pixel

Facebook Pixel integration for Laravel

36107.8k](/packages/weblagence-laravel-facebook-pixel)[highideas/laravel-users-online

This package will provide an online users management.

203111.7k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20316.9k](/packages/stephenjude-filament-blog)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11217.5k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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