Class: GoogleAnalytics::Events::SetCustomDimension
- Inherits:
-
GoogleAnalytics::Event
- Object
- GoogleAnalytics::Event
- GoogleAnalytics::Events::SetCustomDimension
- Defined in:
- lib/google-analytics/events/events.rb
Instance Attribute Summary
Attributes inherited from GoogleAnalytics::Event
Instance Method Summary collapse
-
#initialize(index, value) ⇒ SetCustomDimension
constructor
A new instance of SetCustomDimension.
Methods inherited from GoogleAnalytics::Event
Constructor Details
#initialize(index, value) ⇒ SetCustomDimension
Returns a new instance of SetCustomDimension.
128 129 130 131 |
# File 'lib/google-analytics/events/events.rb', line 128 def initialize(index, value) raise ArgumentError, "The index has to be between 1 and #{GA.max_custom_indices}" unless (1..GA.max_custom_indices).include?(index.to_i) super('set', "dimension#{index}", value.to_s) end |