Class: GAQ::Events::ECommerce::AddTransaction

Inherits:
GAQ::Event
  • Object
show all
Defined in:
lib/google_analytics_tools/tracking/events/events.rb

Instance Attribute Summary

Attributes inherited from GAQ::Event

#name, #params

Instance Method Summary collapse

Constructor Details

#initialize(order_id, store_name, total, tax, shipping, city, state_or_province, country) ⇒ AddTransaction

_gaq.push([‘_addTrans’,

'1234',           // order ID - required
'Acme Clothing',  // affiliation or store name
'11.99',          // total - required
'1.29',           // tax
'5',              // shipping
'San Jose',       // city
'California',     // state or province
'USA'             // country

]);



58
59
60
# File 'lib/google_analytics_tools/tracking/events/events.rb', line 58

def initialize(order_id, store_name, total, tax, shipping, city, state_or_province, country)
  super('_addTrans', order_id.to_s, store_name.to_s, total.to_s, tax.to_s, shipping.to_s, city.to_s, state_or_province.to_s, country.to_s)
end