lib/gabba/event.rb
def event_params(category, action, label = nil, value = 1 , utmni = false, utmhid = false)
        raise ArgumentError.new("utmni must be a boolean") if (utmni.class != TrueClass && utmni.class != FalseClass)
        raise ArgumentError.new("value must be integer > 0 or nil") if ( value.to_i == 0 ) # value >1 required.
        {

          # unless @v.present? # Conditional setting of variables
          # :utmwv => @utmwv,
          # :utmn => @utmn,
          # :utmhn => @utmhn,
          # :utmni => (1 if utmni), # 1 for non interactive event, excluded from bounce calcs
          # :utmt => 'event',
          # :utme => "#{event_data(category, action, label, value)}#{custom_var_data}",
          # :utmcs => @utmcs,
          # :utmul => @utmul,
          # :utmhid => utmhid,
          # :utmac => @utmac,
          # :utmcc => @utmcc || cookie_params,
          # :utmr => @utmr,
          # :utmip => @utmip,
          # :utme => self.custom_var_data
          # end

          :v => @v,
          :tid => @tid,
          :cid => @cid,
          :t => 'event',
          :ec => category,
          :ea => action,
          :el => label,
          :ev => value,
          :an => @an, # MUST be included in parameters but does NOT have to be defined.
          :aid => @aid,
          :av => @av,
          :aiid => @aiid
        }
      end
# Public: Renders event params data in the format needed for GA
# Called before actually sending the data along to GA in Gabba#event
Renders event params data in the format needed for GA
Called before actually sending the data along to GA in Gabba#event
Renders event params data in the format needed for GA Called before actually sending the data along to GA in Gabba#event
def event_params(category, action, label = nil, value = 1 , utmni = false, utmhid = false)
        raise ArgumentError.new("utmni must be a boolean") if (utmni.class != TrueClass && utmni.class != FalseClass)
        raise ArgumentError.new("value must be integer > 0 or nil") if ( value.to_i == 0 ) 
        {
          :v => @v,
          :tid => @tid,
          :cid => @cid,
          :t => 'event',
          :ec => category,
          :ea => action,
          :el => label,
          :ev => value,
          :an => @an, 
          :aid => @aid,
          :av => @av,
          :aiid => @aiid
        }
      end
def event_params ( category , action , label = nil , value = 1 , utmni = false , utmhid = false ) raise ArgumentError . new ( "utmni must be a boolean" ) if ( utmni . class != TrueClass && utmni . class != FalseClass ) raise ArgumentError . new ( "value must be integer > 0 or nil" ) if ( value . to_i == 0 ) { :v => @v , :tid => @tid , :cid => @cid , :t => 'event' , :ec => category , :ea => action , :el => label , :ev => value , :an => @an , :aid => @aid , :av => @av , :aiid => @aiid } end
Public: Renders event params data in the format needed for GA
Called before actually sending the data along to GA in Gabba#event
Public : Renders event params data in the format needed for GA Called before actually sending the data along to GA in Gabba#event
# value >1 required. # unless @v.present? # Conditional setting of variables # :utmwv => @utmwv, # :utmn => @utmn, # :utmhn => @utmhn, # :utmni => (1 if utmni), # 1 for non interactive event, excluded from bounce calcs # :utmt => 'event', # :utme => "#{event_data(category, action, label, value)}#{custom_var_data}", # :utmcs => @utmcs, # :utmul => @utmul, # :utmhid => utmhid, # :utmac => @utmac, # :utmcc => @utmcc || cookie_params, # :utmr => @utmr, # :utmip => @utmip, # :utme => self.custom_var_data # end # MUST be included in parameters but does NOT have to be defined.
category
action
label
value
utmni
utmhid