Class: GAQ::Events::ECommerce::AddItem

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, product_id, product_name, product_variation, unit_price, quantity) ⇒ AddItem

_gaq.push(['_addItem',

'1234',           // order ID - required
'DD44',           // SKU/code - required
'T-Shirt',        // product name
'Green Medium',   // category or variation
'11.99',          // unit price - required
'1'               // quantity - required

]);


75
76
77
# File 'lib/google_analytics_tools/tracking/events/events.rb', line 75

def initialize(order_id, product_id, product_name, product_variation, unit_price, quantity)
  super('_addItem', order_id.to_s, product_id.to_s, product_name.to_s, product_variation.to_s, unit_price.to_s, quantity.to_s)
end