Module: GoogleAnalyticsMailer
- Defined in:
- lib/google_analytics_mailer.rb,
lib/google_analytics_mailer/url_for.rb,
lib/google_analytics_mailer/version.rb
Overview
:nodoc:
Defined Under Namespace
Modules: GoogleAnalytics, UrlFor Classes: UriBuilder
Constant Summary collapse
- VALID_ANALYTICS_PARAMS =
These are the currently GA allowed get params for link tagging
[:utm_source, :utm_medium, :utm_campaign, :utm_term, :utm_content]
- VERSION =
Application version
'0.2.1'
Instance Method Summary collapse
-
#google_analytics_mailer(params = {}) ⇒ Object
(also: #google_analytics_controller)
Enable google analytics link tagging for the mailer (or controller) which call this method.
Instance Method Details
#google_analytics_mailer(params = {}) ⇒ Object Also known as: google_analytics_controller
Enable google analytics link tagging for the mailer (or controller) which call this method
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/google_analytics_mailer.rb', line 22 def google_analytics_mailer(params = {}) if (params.keys - VALID_ANALYTICS_PARAMS).any? raise ArgumentError, "Invalid parameters keys #{params.keys - VALID_ANALYTICS_PARAMS}" end # add accessor for class level parameters cattr_accessor(:google_analytics_class_params) { params } # include the module which provides the actual functionality include GoogleAnalytics end |