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
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 =
"0.1.2"
Instance Method Summary collapse
-
#google_analytics_mailer(params = {}) ⇒ Object
Enable google analytics link tagging for the mailer which call this method.
Instance Method Details
#google_analytics_mailer(params = {}) ⇒ Object
Enable google analytics link tagging for the mailer which call this method
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/google_analytics_mailer.rb', line 15 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 |