Created
June 19, 2009 18:25
-
-
Save mig/132772 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TopExitPagesReport | |
include Garb::Resource | |
include ReportHelper | |
metrics :pageviews, :exit_rate, :exits | |
dimensions :request_uri | |
def self.results_for(profile, date) | |
new(profile, date) | |
end | |
def initialize(profile, date) | |
@profile, @date = profile, range_options(date) | |
end | |
def results | |
self.class.results(@profile, @date.merge(:limit => 10)) do | |
sort :pageviews.desc | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TopExitPagesReport | |
include Garb::Resource | |
extend ReportHelper | |
metrics :pageviews, :exit_rate, :exits | |
dimensions :request_uri | |
def self.results_for(profile, date) | |
date_range = range_options(date) | |
results(profile, date_range.merge(:limit => 10)) do | |
sort :pageviews.desc | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment