A COPRL presenter plugin that includes Google Analytics scripts on the page.
Add this line to your application's Gemfile:
gem 'google_analytics_presenter_plugin', git: 'https://github.com/evvnt/google_analytics_presenter_plugin'
And then execute:
$ bundle
You'll also need to configure a measurement_id
:
Coprl::Presenters::Plugins::GoogleAnalytics::Settings.configure do |c|
c.measurement_id = 'G-something'
end
To include Google Analytics on all pages, add the :google_analytics
plugin to COPRL's global
collection of plugins:
Coprl::Presenters::Settings.configure do |c|
c.presenters.plugins << :google_analytics
end
If you don't want Google Analytics active everywhere, include it in individual POMs as necessary:
plugin :google_analytics
Bug reports and pull requests are welcome on GitHub at https://github.com/evvnt/google_analytics_presenter_plugin.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the COPRL project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.