class Rack::Tracker::GoogleAnalytics::Ecommerce

Public Instance Methods

write() click to toggle source
# File lib/rack/tracker/google_analytics/google_analytics.rb, line 44
def write
  attributes = self.to_h.except(:type).compact.stringify_values

  [
    "ecommerce:#{self.type}",
    attributes
  ].to_json.gsub(/\[|\]/, '')
end