Class: GoogleAnalytics::Event
- Inherits:
-
Struct
- Object
- Struct
- GoogleAnalytics::Event
- 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
-
#action ⇒ Object
Returns the value of attribute action.
-
#category ⇒ Object
Returns the value of attribute category.
-
#label ⇒ Object
Returns the value of attribute label.
-
#noninteraction ⇒ Object
Returns the value of attribute noninteraction.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
7 8 9 |
# File 'lib/tracking/event.rb', line 7 def action @action end |
#category ⇒ Object
Returns the value of attribute category
7 8 9 |
# File 'lib/tracking/event.rb', line 7 def category @category end |
#label ⇒ Object
Returns the value of attribute label
7 8 9 |
# File 'lib/tracking/event.rb', line 7 def label @label end |
#noninteraction ⇒ Object
Returns the value of attribute noninteraction
7 8 9 |
# File 'lib/tracking/event.rb', line 7 def noninteraction @noninteraction end |
#value ⇒ Object
Returns the value of attribute value
7 8 9 |
# File 'lib/tracking/event.rb', line 7 def value @value end |
Instance Method Details
#write ⇒ Object
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 |