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
Constructor Details
Instance Attribute Details
#referrer ⇒ Object
Returns the value of attribute referrer.
87 88 89 |
# File 'lib/kameleoon/data.rb', line 87 def referrer @referrer end |
#title ⇒ Object
Returns the value of attribute title.
87 88 89 |
# File 'lib/kameleoon/data.rb', line 87 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
87 88 89 |
# File 'lib/kameleoon/data.rb', line 87 def url @url end |
Instance Method Details
#obtain_full_post_text_line ⇒ Object
100 101 102 103 104 105 106 107 |
# File 'lib/kameleoon/data.rb', line 100 def obtain_full_post_text_line nonce = Kameleoon::Utils.generate_random_string(NONCE_LENGTH) referrer_text = "" unless @referrer.nil? referrer_text = "&referrers=[" + @referrer + "]" end "eventType=page&href=" + @url + "&title=" + @title + "&keyPages=[]" + referrer_text + "&nonce=" + nonce end |