Class: Kameleoon::PageView
Instance Attribute Summary collapse
-
#referrer ⇒ Object
Returns the value of attribute referrer.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Data
Instance Method Summary collapse
-
#initialize(url, title, referrer = nil) ⇒ PageView
constructor
A new instance of PageView.
- #obtain_full_post_text_line ⇒ Object
Methods inherited from Data
Constructor Details
Instance Attribute Details
#referrer ⇒ Object
Returns the value of attribute referrer.
97 98 99 |
# File 'lib/kameleoon/data.rb', line 97 def referrer @referrer end |
#title ⇒ Object
Returns the value of attribute title.
97 98 99 |
# File 'lib/kameleoon/data.rb', line 97 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
97 98 99 |
# File 'lib/kameleoon/data.rb', line 97 def url @url end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
110 111 112 113 114 115 116 117 |
# File 'lib/kameleoon/data.rb', line 110 def obtain_full_post_text_line nonce = Kameleoon::Utils.generate_random_string(NONCE_LENGTH) referrer_text = "" unless @referrer.nil? referrer_text = "&referrers=[" + @referrer.to_s + "]" end "eventType=page&href=" + encode(@url) + "&title=" + @title + "&keyPages=[]" + referrer_text + "&nonce=" + nonce end |