定制 rezkonline/laravel-meta-pixel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rezkonline/laravel-meta-pixel

最新稳定版本:v1.0.2

Composer 安装命令:

composer require rezkonline/laravel-meta-pixel

包简介

Meta Pixel Integration for Laravel framework

README 文档

README

Install

composer require rezkonline/laravel-meta-pixel

In Laravel 5.5 and up

The package will be automatically registered it's Service Provider and Facade

In Laravel 5.4 or below

// config/app.php

'providers' => [
    //
    \Rezkonline\LaravelMetaPixel\Providers\MetaPixelServiceProvider::class,
    //
],

'facades' => [
    //
    'LaravelMetaPixel' => \Rezkonline\LaravelMetaPixel\Facades\MetaPixelFacade::class,
    //
],

Next, publish the config file:

php artisan vendor:publish --provider="Rezkonline\LaravelMetaPixel\Providers\MetaPixelServiceProvider"

Configuration

return [
    /*
     * The Facebook Meta ID.
     */
    'meta_pixel_id' => env('META_PIXEL_ID', ''),
];

Usage

Basic Usage

{{-- layout.blade.php --}}
<html>
  <head>
    @include('meta-pixel::script')
    {{-- !!! --}}
  </head>
  <body>
    {{-- !!! --}}
  </body>
</html>

Send Event

Call a function based on Meta Pixel standarted events Standard Event according to the following table:

Event Method
AddPaymentInfo addPaymentInfoEvent
AddToCart addToCartEvent
AddToWishlist addToWishlistEvent
CompleteRegistration completeRegistrationEvent
Contact contactEvent
CustomizeProduct customizeProductEvent
Donate donateEvent
FindLocation findLocationEvent
Lead leadEvent
InitiateCheckout initiateCheckoutEvent
Purchase purchaseEvent
Schedule scheduleEvent
Search searchEvent
StartTrial startTrialEvent
SubmitApplication submitApplicationEvent
Subscribe subscribeEvent
ViewContent viewContentEvent

Example

\LaravelMetaPixel::addToCartEvent([
    // List of event parameters
])

License

The MIT License (MIT). Please head to License File for more information.

统计信息

  • 总下载量: 84
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固