Enables synchnronization of Facebook Lead Ads as leads into Mautic.
Switch branches/tags
Nothing to show
Clone or download
Latest commit a162042 Jul 5, 2017



Enables synchnronization of Facebook Lead Ads as leads into Mautic.

Development was sponsored by Trinoco for the Qeado project.


  1. Require the FB ads library in the Mautic root directory composer require facebook/php-ads-sdk:2.9.*

The library has been tested on 5.6 to also work so if you get requirements errors try: composer require --ignore-platform-reqs facebook/php-ads-sdk:2.9.*

  1. Create a new Facebook App or use an existing one: https://developers.facebook.com/apps/

  2. Visit the app Dashboard page and store the app_id and app_key for later use.

  3. Add the Marketing API Product.

  4. Visit the Marketing API -> Tools page in your app and check the scopes and hit Get Token. Store this access_token for later use.

  5. Go into your Facebook Ads account management and get your ad account id.

  6. Enable the plugin and enter your app_id, app_secret, Marketing API access_token, ad account id and choose a verify token.

  7. Authenticate the app using oAuth.

  8. In the plugin settings map the fields to your contact lead fields.

  9. Enable the webhooks Product in your Facebook App.

  10. Go to the webhooks product in your Facebook APP and add your subscriber to the 'page' event: url: $YOURHOST/plugin/fbadsleadads/leadform_subscriber verify_token: Token you choose in step 7.

  11. In your Facebook App Review add the manage_pages scope for review.