Sha256: c1bf4cd2c128aa2c2c85cfe5a8b3c176bd7a870494a3feeb0f27ddfb0714ef4f
Contents?: true
Size: 614 Bytes
Versions: 49
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true require 'legato' module Spotlight module Analytics ## # Google Analytics data model for the Exhibit dashboard class GaModel extend Legato::Model metrics :sessions, :users, :pageviews def self.context(exhibit) if exhibit.is_a? Spotlight::Exhibit for_exhibit(exhibit) else path(exhibit) end end def self.for_exhibit(exhibit) path(Spotlight::Engine.routes.url_helpers.exhibit_path(exhibit)) end filter :path, &->(path) { contains(:pagePath, "^#{path}") } end end end
Version data entries
49 entries across 49 versions & 1 rubygems