Class: GoogleAnalytics::Events::SetupAnalytics
- Inherits:
-
GoogleAnalytics::Event
- Object
- GoogleAnalytics::Event
- GoogleAnalytics::Events::SetupAnalytics
- Defined in:
- lib/google-analytics/events/events.rb
Instance Attribute Summary
Attributes inherited from GoogleAnalytics::Event
Instance Method Summary collapse
-
#initialize(account_id, opts = {}) ⇒ SetupAnalytics
constructor
A new instance of SetupAnalytics.
Methods inherited from GoogleAnalytics::Event
Constructor Details
#initialize(account_id, opts = {}) ⇒ SetupAnalytics
Returns a new instance of SetupAnalytics.
7 8 9 10 11 12 13 14 15 |
# File 'lib/google-analytics/events/events.rb', line 7 def initialize(account_id, opts={}) if ['auto','none'].include?(opts) || opts.empty? super('create', account_id, opts.empty? ? 'auto' : opts) elsif opts.is_a?(Hash) super('create', account_id, attributes_hash(opts)) else super('create', account_id, {:cookieDomain => opts}) end end |