class GoogleAnalytics::Event

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

Public Instance Methods

write() click to toggle source
# File lib/tracking/event.rb, line 10
def write
  { hitType: 'event', eventCategory: self.category, eventAction: self.action, eventLabel: self.label, eventValue: self.value }.select{|k,v| v }.to_json
end