Class: GoogleAnalytics::Events::SetSiteSpeedSampleRate

Inherits:
Object
  • Object
show all
Defined in:
lib/google-analytics/events/events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sample_rate) ⇒ SetSiteSpeedSampleRate

Returns a new instance of SetSiteSpeedSampleRate.



65
66
67
68
# File 'lib/google-analytics/events/events.rb', line 65

def initialize(sample_rate)
  @sample_rate = sample_rate
  warn "[REMOVED] `SetSiteSpeedSampleRate` is being removed. Universal Analytics does not support this any longer. Please see GoogleAnalytics::Events::SetupAnalytics"
end

Instance Attribute Details

#sample_rateObject

Parameters:

  • sample_rate (Integer)

    the percentage of page views that should be used for page speed metrics - defaults to 1 (aka 1%) if the event is missing.



64
65
66
# File 'lib/google-analytics/events/events.rb', line 64

def sample_rate
  @sample_rate
end