Class: Kameleoon::Conversion
Instance Attribute Summary collapse
-
#goal_id ⇒ Object
Returns the value of attribute goal_id.
-
#negative ⇒ Object
Returns the value of attribute negative.
-
#revenue ⇒ Object
Returns the value of attribute revenue.
Attributes inherited from Data
Instance Method Summary collapse
-
#initialize(goal_id, revenue = 0.0, negative = false) ⇒ Conversion
constructor
A new instance of Conversion.
- #obtain_full_post_text_line ⇒ Object
Constructor Details
#initialize(goal_id, revenue = 0.0, negative = false) ⇒ Conversion
Returns a new instance of Conversion.
116 117 118 119 120 121 122 |
# File 'lib/kameleoon/data.rb', line 116 def initialize(goal_id, revenue = 0.0, negative = false) @instance = DataType::CONVERSION @sent = false @goal_id = goal_id @revenue = revenue @negative = negative end |
Instance Attribute Details
#goal_id ⇒ Object
Returns the value of attribute goal_id.
111 112 113 |
# File 'lib/kameleoon/data.rb', line 111 def goal_id @goal_id end |
#negative ⇒ Object
Returns the value of attribute negative.
111 112 113 |
# File 'lib/kameleoon/data.rb', line 111 def negative @negative end |
#revenue ⇒ Object
Returns the value of attribute revenue.
111 112 113 |
# File 'lib/kameleoon/data.rb', line 111 def revenue @revenue end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
124 125 126 127 |
# File 'lib/kameleoon/data.rb', line 124 def obtain_full_post_text_line nonce = Kameleoon::Utils.generate_random_string(NONCE_LENGTH) "eventType=conversion&goalId=" + @goal_id.to_s + "&revenue=" + @revenue.to_s + "&negative=" + @negative.to_s + "&nonce=" + nonce end |