Module: AnalyticsRuby::ClassMethods

Included in:
AnalyticsRuby
Defined in:
lib/analytics-ruby.rb

Instance Method Summary collapse

Instance Method Details

#alias(options) ⇒ Object



21
22
23
24
# File 'lib/analytics-ruby.rb', line 21

def alias(options)
  return false unless @client
  @client.alias options
end

#flushObject



41
42
43
44
# File 'lib/analytics-ruby.rb', line 41

def flush
  return false unless @client
  @client.flush
end

#group(options) ⇒ Object



26
27
28
29
# File 'lib/analytics-ruby.rb', line 26

def group(options)
  return false unless @client
  @client.group options
end

#identify(options) ⇒ Object



16
17
18
19
# File 'lib/analytics-ruby.rb', line 16

def identify(options)
  return false unless @client
  @client.identify options
end

#init(options = {}) ⇒ Object

By default use a single client for the module



7
8
9
# File 'lib/analytics-ruby.rb', line 7

def init(options = {})
  @client = AnalyticsRuby::Client.new options
end

#initialized?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/analytics-ruby.rb', line 46

def initialized?
  !!@client
end

#page(options) ⇒ Object



31
32
33
34
# File 'lib/analytics-ruby.rb', line 31

def page(options)
  return false unless @client
  @client.page options
end

#screen(options) ⇒ Object



36
37
38
39
# File 'lib/analytics-ruby.rb', line 36

def screen(options)
  return false unless @client
  @client.screen options
end

#track(options) ⇒ Object



11
12
13
14
# File 'lib/analytics-ruby.rb', line 11

def track(options)
  return false unless @client
  @client.track options
end