Class: TheTracker::Trackers::AdForm
- Defined in:
- lib/the_tracker/trackers/ad_form.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(options) ⇒ AdForm
constructor
AdForm info pm and id.
- #name ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ AdForm
AdForm info pm and id
6 7 8 9 10 |
# File 'lib/the_tracker/trackers/ad_form.rb', line 6 def initialize() @pm = [:pm] @id = [:id] super() end |
Instance Method Details
#header ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/the_tracker/trackers/ad_form.rb', line 16 def header return if !active <<-EOF <!-- Adform Tracking Code BEGIN --> <script type="text/javascript"> var _adftrack = { pm: #{@pm}, id: #{@id} }; (function(){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='https://track.adform.net/serving/scripts/trackpoint/async/';var x = document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);})(); </script> <noscript> <p style="margin:0;padding:0;border:0;"> <img src="https://track.adform.net/Serving/TrackPoint/?pm=#{@pm}&lid=#{@id}" width="1" height="1" alt="" /> </p> </noscript> <!-- Adform Tracking Code END --> EOF end |
#name ⇒ Object
12 13 14 |
# File 'lib/the_tracker/trackers/ad_form.rb', line 12 def name :adform end |