middleman-facebook-pixel
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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
Copyright (c) 2016 Kairat Jenishev. See LICENSE for details.
Inspired by middleman-google-analytics