cinghie / facebook-pixel-for-wordpress
Facebook Pixel plugins for wordpress
- dev-master
- dev-dependabot/npm_and_yarn/__tests__/e2e/site/wp-content/themes/twentynineteen/mixin-deep-1.3.2
- dev-dependabot/npm_and_yarn/__tests__/e2e/site/wp-content/themes/twentynineteen/fstream-1.0.12
- dev-dependabot/npm_and_yarn/__tests__/e2e/site/wp-content/themes/twentynineteen/js-yaml-3.13.1
- dev-dependabot/npm_and_yarn/__tests__/e2e/site/wp-content/themes/twentynineteen/lodash.mergewith-4.6.2
- dev-dependabot/npm_and_yarn/__tests__/e2e/site/wp-content/themes/twentynineteen/tar-2.2.2
This package is auto-updated.
Last update: 2024-10-23 09:50:55 UTC
README
Grow your business with Facebook for WordPress! This plugin will install a Facebook Pixel for your page. There is also built in support for other WordPress plugins, such as Contact Form 7, Easy Digital Downloads, Ninja Forms, and WPForms. The Official Facebook Pixel allows you to fire lower funnel events: Lead, ViewContent, AddToCart, InitiateCheckout and Purchase. Tracking lower funnel events can help you understand the actions people are taking on your website. You can then use this information to make adjustments accordingly in your advertising campaigns.
Requirements
Official Facebook Pixel requires
- WordPress 4.4+ or higher
- PHP 5.3 or greater
Get started
Clone this repo with the following command:
$ git clone https://github.com/facebookincubator/facebook-pixel-for-wordpress.git
Initiate the development environment:
- Install Composer
- Run the command to install the necessary package:
$ composer install
Build the project and create the zip Run the command to run tests and create the zip under build directory.
$ vendor/bin/phing
Full Documentation
https://www.facebook.com/business/help/881403525362441
How to integrate your plugins
- Add your integration class under
integration/
folder - Extend the class from
FacebookWordpressIntegrationBase
- Define class variable
PLUGIN_FILE
to be your plugin PHP file - Define class variable
TRACKING_NAME
for tracking purpose, put this value under 'fb_wp_tracking' as a parameter in the pixel event - Define a public static function
injectPixelCode()
to inject pixel at your page - Add your unit test class under
tests/
folder - Extend the test class from
FacebookWordpressTestBase
- After the classes development, run tests by
$ vendor/bin/phing
You can reference to integration/FacebookWordpressContactForm7.php and tests/FacebookWordpressContactForm7Test.php as an example
Contributing
See the CONTRIBUTING file for how to help out
License
Official Facebook Pixel is GPLv2-licensed