FacebookPixelConversionApi
A simple PHP class which can send server side events to Facebook Pixel Conversion API. I posted it online so others could save one hour of work.
Install / Use
/learn @besciualex/FacebookPixelConversionApiREADME
Simple FacebookPixelConversionApi Class
This class allows someone to quickly send Facebook Events for the new Pixel Conversion API. I uploaded it here so others could use it fast, without bothering to read documentation. Facebook API used at the moment of initial commit is v10 (stable on April 2021).
Description
This class uses only three events from whole Facebook Event List as I only required those three. Feel free to expand it as you like.
- ViewContent - should be called on Landing pages or important pages
- Lead - should be used on LEAD conversion
- Contact - should be used on Contact page/scripts
Getting Started
Dependencies
- None
Installing
- Copy and include the class file
- Change $token and $pixel_id values inside class.
- Move usage examples inside targeted files/scripts/APIs.
Version History
- 0.1
- Initial Release
License
This project is licensed under the MIT License - see the LICENSE.md file for details
