Initial iteration
[ckanext-ga-report.git] / README.rst
David Read 1 ckanext-ga-report
2 =================
3
4 **Status:** Development
5
6 **CKAN Version:** 1.7.1+
7
8
9 Overview
10 --------
11
12 For creating detailed reports of CKAN analytics, including totals per group.
13
14 Whereas ckanext-googleanalytics focusses on providing page view stats a recent period and for all time (aimed at end users), ckanext-ga-report is more interested in building regular periodic reports (more for site managers to monitor).
15
16 Contents of this extension:
17
18 * Use the CLI tool to download Google Analytics data for each time period into this extension's database tables
19
20 * Users can view the data as web page reports
21
22
23 Installation
24 ------------
25
26 1. Activate you CKAN python environment and install this extension's software::
27
28 $ pyenv/bin/activate
29 $ pip install -e git+https://github.com/okfn/ckanext-ga-report.git#egg=ckanext-ga-report
30
31 2. Ensure you development.ini (or similar) contains the info about your Google Analytics account and configuration::
32
33 googleanalytics.id = UA-1010101-1
34 googleanalytics.username = googleaccount@gmail.com
35 googleanalytics.password = googlepassword
36 ga-report.period = monthly
37
38 Note that your password will be readable by system administrators on your server. Rather than use sensitive account details, it is suggested you give access to the GA account to a new Google account that you create just for this purpose.
39
40 3. Set up this extension's database tables using a paster command. (Ensure your CKAN pyenv is still activated, run the command from ``src/ckanext-ga-report``, alter the ``--config`` option to point to your site config file)::
41
42 $ paster initdb --config=../ckan/development.ini
43
44 4. Enable the extension in your CKAN config file by adding it to ``ckan.plugins``::
45
46 ckan.plugins = ga-report
47
48
49 Tutorial
50 --------
51
52 Download some GA data and store it in CKAN's db. (Ensure your CKAN pyenv is still activated, run the command from ``src/ckanext-ga-report``, alter the ``--config`` option to point to your site config file)::
53
54 $ paster loadanalytics latest --config=../ckan/development.ini
55
56
57 Software Licence
58 ================
59
60 This software is developed by Cabinet Office. It is Crown Copyright and opened up under the Open Government Licence (OGL) (which is compatible with Creative Commons Attibution License).
61
62 OGL terms: http://www.nationalarchives.gov.uk/doc/open-government-licence/
63