Class: GoogleAnalytics::Events::SetupAnalytics

Inherits:
GoogleAnalytics::Event show all
Defined in:
lib/google-analytics/events/events.rb

Instance Attribute Summary

Attributes inherited from GoogleAnalytics::Event

#action, #name, #params

Instance Method Summary collapse

Methods inherited from GoogleAnalytics::Event

#single_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(, opts={})
  if ['auto','none'].include?(opts) || opts.empty?
    super('create', , opts.empty? ? 'auto' : opts)
  elsif opts.is_a?(Hash)
    super('create', , attributes_hash(opts))
  else
    super('create', , {:cookieDomain => opts})
  end
end