middleman-facebook-pixel

Gem Version Build Status

middleman-facebook-pixel is a Middleman extension that generates Facebook Pixel code, and keeps your config in config.rb, where it belongs.

Installation

Specify the dependency in your project's Gemfile:

  gem 'middleman-facebook-pixel'

Activate the Facebook Pixel extension in your project's config.rb:

  # ...
  activate :facebook_pixel, id: 1234567890
  # ...

In your layout, in <head> section, call facebook_pixel helper:

Haml:

  # Facebook Pixel
  = facebook_pixel

ERB:

  # Facebook Pixel
  <%= facebook_pixel %>

That's it!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

Copyright (c) 2016 Kairat Jenishev. See LICENSE for details.

Inspired by middleman-google-analytics