Class: GoogleAnalytics::Events::SetCustomVar
- Inherits:
-
GoogleAnalytics::Event
- Object
- GoogleAnalytics::Event
- GoogleAnalytics::Events::SetCustomVar
- Defined in:
- lib/google-analytics/events/events.rb
Instance Attribute Summary
Attributes inherited from GoogleAnalytics::Event
Instance Method Summary collapse
-
#initialize(index, name, value, opt_scope) ⇒ SetCustomVar
constructor
A new instance of SetCustomVar.
Constructor Details
#initialize(index, name, value, opt_scope) ⇒ SetCustomVar
Returns a new instance of SetCustomVar.
57 58 59 60 |
# File 'lib/google-analytics/events/events.rb', line 57 def initialize(index, name, value, opt_scope) raise ArgumentError, "The index has to be between 1 and 5" unless (1..5).include?(index.to_i) super('_setCustomVar', index.to_i, name.to_s, value.to_s, opt_scope.to_i) end |