Class: GoogleAnalytics::Events::SetCustomDimension

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(index, value) ⇒ SetCustomDimension

Returns a new instance of SetCustomDimension.

Raises:

  • (ArgumentError)


126
127
128
129
# File 'lib/google-analytics/events/events.rb', line 126

def initialize(index, value)
  raise ArgumentError, "The index has to be between 1 and 5" unless (1..5).include?(index.to_i)
  super('set', "dimension#{index}", value.to_s)
end