Changes between Version 1 and Version 6 of Ticket #2251


Ignore:
Timestamp:
03/23/12 17:35:23 (2 years ago)
Author:
rgrp
Comment:

Update description in great detail.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2251

    • Property Status changed from new to accepted
  • Ticket #2251 – Description

    v1 v6  
    11Page views and Resources clicks need to be tracked. 
    22 
    3 Google analytics can not be used for ecportal so build something very quick and simple inside ckan. 
     3== User Stories == 
     4 
     5US1 As a Site Admin / Visitor (?) I want to see how often a page has been viewed (every page) and how often resources have been downloaded. 
     6 
     7US1a Next to a resource or a dataset see how often it has been downloaded / viewed 
     8 
     9US1b I want to see datasets or resources ranked by most downloaded or viewed 
     10 
     11US1c See a trend graph for a dataset (and resources) 
     12 
     13Adminstrative Dashboard (?) 
     14 
     15    * I want to see the traffic breakdown by country to my site ... 
     16    * Ditto for browser type, language, etc etc 
     17    * I want to see it graphed over time ... 
     18 
     19== Implementation Details == 
     20 
     211. How do we store this data in CKAN? 
     222. How do we track (and store)? 
     233. How do we display 
     24 
     25* Config option ckan.status.enabled = False (by default) 
     26 
     27=== Storing Data === 
     28 
     29How does ckanext-googleanalytics do this? Current table: 
     30 
     31package_id | count_recent | count_total 
     32 
     33Move to a new stats_summary table 
     34 
     35id | item_id | object_type | stats_type (total, month_yyyy_mm, ...) | value 
     36 
     37Do we store this data into the search (solr) so we can search by it? 
     38 
     39=== Displaying Data === 
     40 
     41 * Helper functions / dictize: 
     42  * Helper function: h.stats_get(object_type, id, stats_type) 
     43   * h.stats_top_ranked(object_type, number) -> returns object_dicts or just labels or ... 
     44  * Change to dictize 
     45 * Location in the default theme (do we show for example in search results too!) 
     46 * Support for ranking by most popular in search? 
     47 
     48=== Tracking Data === 
     49 
     50* Our own solution (just write to site_tracking) 
     51* Google analytics (plus extension for retrieving data) <- would need a refactor 
     52* Piwiki 
     53 
     54==== Own Solution ==== 
     55 
     56site_tracking table 
     57 
     58id | url | timestamp | action (page_view, resource_download) | 
    459 
    560 * Make javascript to make request to ckan to store clicks and page views. 
    661 * Add middleware so these requests do not go through pylons and just store data quickly. 
    7  * Add config option to enable. 
    8  * Copy reporting from ckanext-googleanalytics.