Class: Sentiero::Web::Views::ConversionsView
- Defined in:
- lib/sentiero/web/views/conversions_view.rb
Constant Summary
Constants inherited from BaseView
BaseView::TEMPLATES_DIR, BaseView::TEMPLATE_CACHE
Constants included from Escaping
Escaping::HTML_UNSAFE_IN_SCRIPT, Escaping::HTML_UNSAFE_IN_SCRIPT_PATTERN
Instance Attribute Summary collapse
-
#entry_pages ⇒ Object
readonly
Returns the value of attribute entry_pages.
-
#referrers ⇒ Object
readonly
Returns the value of attribute referrers.
-
#selected_tag ⇒ Object
readonly
Returns the value of attribute selected_tag.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#until_str ⇒ Object
readonly
Returns the value of attribute until_str.
-
#utm ⇒ Object
readonly
Returns the value of attribute utm.
-
#was_truncated ⇒ Object
readonly
Returns the value of attribute was_truncated.
Attributes inherited from BaseView
Instance Method Summary collapse
- #facets ⇒ Object
-
#initialize(tags:, selected_tag:, entry_pages:, referrers:, utm:, was_truncated:, since:, until_str:) ⇒ ConversionsView
constructor
A new instance of ConversionsView.
- #player_link(ex) ⇒ Object
- #template ⇒ Object
Methods inherited from BaseView
#built_asset, compiled_template, #escape_js, #h, #range_pairs, #render, #render_layout, #render_partial, #render_session_row
Methods included from Formatting
#format_duration, #format_vital, #parse_browser, #parse_device
Methods included from Escaping
#escape_html, #escape_js_string, #escape_json
Constructor Details
#initialize(tags:, selected_tag:, entry_pages:, referrers:, utm:, was_truncated:, since:, until_str:) ⇒ ConversionsView
Returns a new instance of ConversionsView.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 9 def initialize(tags:, selected_tag:, entry_pages:, referrers:, utm:, was_truncated:, since:, until_str:) super() @tags = @selected_tag = selected_tag @entry_pages = entry_pages @referrers = referrers @utm = utm @was_truncated = was_truncated @since = since @until_str = until_str end |
Instance Attribute Details
#entry_pages ⇒ Object (readonly)
Returns the value of attribute entry_pages.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def entry_pages @entry_pages end |
#referrers ⇒ Object (readonly)
Returns the value of attribute referrers.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def referrers @referrers end |
#selected_tag ⇒ Object (readonly)
Returns the value of attribute selected_tag.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def selected_tag @selected_tag end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def since @since end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def @tags end |
#until_str ⇒ Object (readonly)
Returns the value of attribute until_str.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def until_str @until_str end |
#utm ⇒ Object (readonly)
Returns the value of attribute utm.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def utm @utm end |
#was_truncated ⇒ Object (readonly)
Returns the value of attribute was_truncated.
21 22 23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 21 def was_truncated @was_truncated end |
Instance Method Details
#facets ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 29 def facets [ ["Entry page", "entry page", entry_pages, nil], ["Referrer", "referrer", referrers, nil], ["UTM source", "UTM source", utm[:source], :utm], ["UTM medium", "UTM medium", utm[:medium], :utm], ["UTM campaign", "UTM campaign", utm[:campaign], :utm] ] end |
#player_link(ex) ⇒ Object
25 26 27 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 25 def player_link(ex) "#{h(base_path)}/sessions/#{h(ex[:session_id].to_s)}/windows/#{h(ex[:window_id].to_s)}?t=#{ex[:offset_ms].to_i}" end |
#template ⇒ Object
23 |
# File 'lib/sentiero/web/views/conversions_view.rb', line 23 def template = "analytics_conversions.html.erb" |