Class: TheTracker::Trackers::Yd

Inherits:
Base
  • Object
show all
Defined in:
lib/the_tracker/trackers/yd.rb

Instance Attribute Summary

Attributes inherited from Base

#active

Instance Method Summary collapse

Methods inherited from Base

#body_top, #header

Constructor Details

#initialize(options) ⇒ Yd

Yd info



6
7
8
9
10
11
12
# File 'lib/the_tracker/trackers/yd.rb', line 6

def initialize(options)
  @id         = options[:id]
  @product    = options[:product ]
  @order_id   = options[:order_id]
  @cookies    = options.delete(:cookies_allowed) || 1
  super()
end

Instance Method Details

#body_bottomObject



18
19
20
21
22
23
# File 'lib/the_tracker/trackers/yd.rb', line 18

def body_bottom
  return if !active
  <<-EOF
  <iframe src="https://d.254a.com/pixel?id=#{@id}&t=3&cookies_allowed=#{@cookies}&orderid=#{@order_id}&product=#{@product}&secure=true" width="0" height="0" style="display:none;visibility:hidden"></iframe>
  EOF
end

#nameObject



14
15
16
# File 'lib/the_tracker/trackers/yd.rb', line 14

def name
  :yd
end