Skip to content

Instantly share code, notes, and snippets.

@snide
Created February 2, 2011 01:42
Show Gist options
  • Save snide/807099 to your computer and use it in GitHub Desktop.
Save snide/807099 to your computer and use it in GitHub Desktop.
class NewSignupsBySite(SiteMetricsPanel):
filters = {'action': 'signup'}
dimension = 'site'
verbose_name = 'New Signups by Site'
time_based_aggregations = ((cube.Count(), 'Over Time'), )
summary_aggregations = ((cube.Count(), 'Total'), )
comparison_aggregations = (
('video_type_name', cube.Count(), 'By Plan Type'),
)
site.register(CentralAuthCube, NewSignupsBySite)
class NewSignupsByType(SiteMetricsPanel):
filters = {'action': 'signup'}
dimension = 'plan'
verbose_name = 'New Signups by Plan'
time_based_aggregations = ((cube.Count(), 'Over Time'), )
summary_aggregations = ((cube.Count(), 'Total'), )
comparison_aggregations = (
('site', cube.Count(), 'By Site'),
)
site.register(CentralAuthCube, NewSignupsByType)
class AccountActions(SiteMetricsPanel):
dimension = 'actions'
verbose_name = 'Renewals / Upgrades and Cancels'
time_based_aggregations = ((cube.Count(), 'Over Time'), )
summary_aggregations = ((cube.Count(), 'Total'), )
comparison_aggregations = (
('site', cube.Count(), 'By Site'),
)
site.register(CentralAuthCube, AccountActions)
class NewSignupsByCountry(SiteMetricsPanel):
filters = {'action': 'signup'}
dimension = 'country'
verbose_name = 'New Signups by Country'
time_based_aggregations = ((cube.Count(), 'Over Time'), )
summary_aggregations = ((cube.Count(), 'Total'), )
comparison_aggregations = (
('site', cube.Count(), 'By Site'),
)
site.register(CentralAuthCube, NewSignupsByCountry)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment