Class: Nucleo::Models::FeedTypes::Analytics::Page::Referrers
- Defined in:
- lib/nucleo/models/feed_types/analytics/page/referrers.rb
Constant Summary collapse
- DIMENSION_NAME =
'ga:source'.freeze
- METRIC_NAME =
'ga:pageviews'.freeze
Instance Method Summary collapse
-
#current_period ⇒ Nucleo::Models::MetricPeriod
Delegates to the Metric Period.
-
#metric ⇒ Nucleo::Models::Metric
Returns the specific Metric for this page.
-
#periods_comparisons ⇒ Nucleo::Models::MetricPeriodsComparisons
Delegates to the Metric Period.
-
#prior_period ⇒ Nucleo::Models::MetricPeriod
(also: #previous_period)
Delegates to the Metric Period.
-
#totals ⇒ Nucleo::Models::MetricPeriodsTotals
Delegates to the Totals.
Methods inherited from Base
#<=>, #analytics_category?, #category, #children, #children?, #context, #executed_at, #id, #initialize, #page, #page?, #page_context?, #page_recommendation_id, #record_id, #seo_category?, #site_analytic_id, #site_context?, #site_id, #status, #type
Constructor Details
This class inherits a constructor from Nucleo::Models::FeedTypes::Base
Instance Method Details
#current_period ⇒ Nucleo::Models::MetricPeriod
Delegates to the Metric Period
37 38 39 |
# File 'lib/nucleo/models/feed_types/analytics/page/referrers.rb', line 37 def current_period self.metric.metric_periods.current_period end |
#metric ⇒ Nucleo::Models::Metric
Returns the specific Metric for this page
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/nucleo/models/feed_types/analytics/page/referrers.rb', line 14 def metric params = { 'metric' => METRIC_NAME, 'dimension' => DIMENSION_NAME, 'classification' => @attributes['classification'], 'totals' => data['totals'], 'current_period' => data['current_period'], 'prior_period' => data['prior_period'] } Nucleo::Models::Metric.new(params) end |
#periods_comparisons ⇒ Nucleo::Models::MetricPeriodsComparisons
Delegates to the Metric Period
52 53 54 |
# File 'lib/nucleo/models/feed_types/analytics/page/referrers.rb', line 52 def periods_comparisons self.metric.metric_periods.periods_comparisons end |
#prior_period ⇒ Nucleo::Models::MetricPeriod Also known as: previous_period
Delegates to the Metric Period
44 45 46 |
# File 'lib/nucleo/models/feed_types/analytics/page/referrers.rb', line 44 def prior_period self.metric.metric_periods.prior_period end |
#totals ⇒ Nucleo::Models::MetricPeriodsTotals
Delegates to the Totals
30 31 32 |
# File 'lib/nucleo/models/feed_types/analytics/page/referrers.rb', line 30 def totals self.metric.metric_periods.totals end |