Class: GoogleAnalytics::Event

Inherits:
Struct
  • Object
show all
Defined in:
lib/tracking/event.rb

Overview

A Struct that mirrors the structure of a custom var defined in Google Analytics see developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



7
8
9
# File 'lib/tracking/event.rb', line 7

def action
  @action
end

#categoryObject

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



7
8
9
# File 'lib/tracking/event.rb', line 7

def category
  @category
end

#labelObject

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



7
8
9
# File 'lib/tracking/event.rb', line 7

def label
  @label
end

#noninteractionObject

Returns the value of attribute noninteraction

Returns:

  • (Object)

    the current value of noninteraction



7
8
9
# File 'lib/tracking/event.rb', line 7

def noninteraction
  @noninteraction
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



7
8
9
# File 'lib/tracking/event.rb', line 7

def value
  @value
end

Instance Method Details

#writeObject



9
10
11
# File 'lib/tracking/event.rb', line 9

def write
  ['_trackEvent', self.category, self.action, self.label,self.value, self.noninteraction].to_json
end