Class: GoogleAnalytics::Events::SetCustomVar
- Inherits:
-
GoogleAnalytics::Event
- Object
- GoogleAnalytics::Event
- GoogleAnalytics::Events::SetCustomVar
- Defined in:
- lib/google-analytics/events/events.rb
Overview
Deprecated: Please use SetCustomDimension
or SetCustomMetric
instead
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.
Methods inherited from GoogleAnalytics::Event
Constructor Details
#initialize(index, name, value, opt_scope) ⇒ SetCustomVar
Returns a new instance of SetCustomVar.
120 121 122 123 124 |
# File 'lib/google-analytics/events/events.rb', line 120 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) warn "[DEPRECATION] `SetCustomVar` is deprecated. Please use `SetCustomDimension` or `SetCustomMetric` instead" super('set', "dimension#{index}", value.to_s) end |