-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,44 +272,44 @@ Run the command below to generate a csv file with tracking data: | |
## Tracking data access with Google Analytics | ||
Send tracking data to google analytics using the [ckanext-googleanalytics](https://github.com/ckan/ckanext-googleanalytics) extension by following the steps below. | ||
Send tracking data to google analytics using the [ckanext-googleanalytics](https://github.com/ckan/ckanext-googleanalytics) | ||
extension by following the steps below. | ||
- Activate CKAN's virtual environment | ||
``` | ||
$ . /usr/lib/ckan/default/bin/activate | ||
``` | ||
. /usr/lib/ckan/default/bin/activate | ||
- Install [ckanext-googleanalytics](https://github.com/ckan/ckanext-googleanalytics) | ||
``` | ||
$ pip install -e git+https://github.com/ckan/ckanext-googleanalytics.git#egg=ckanext-googleanalytics | ||
``` | ||
git clone https://github.com/ckan/ckanext-googleanalytics.git | ||
cd ckanext-googleanalytics | ||
pip install -e . | ||
pip install -r requirements.txt | ||
pip install future | ||
- Add the `googleanalytics` plugin in the `ckan.plugins` configuration key, separating each extension by space. | ||
``` | ||
ckan.plugins = [...] googleanalytics | ||
``` | ||
ckan.plugins = [...] googleanalytics | ||
- Create GA tables: | ||
paster --plugin=ckanext-googleanalytics initdb -c /etc/ckan/default/production.ini | ||
- Edit your ckan .ini file to provide these necessary parameters: | ||
``` | ||
googleanalytics.id = UA-XXXXXX-1 | ||
googleanalytics.account = Account name (i.e. data.gov.uk, see top level item at https://www.google.com/analytics) | ||
googleanalytics.username = [email protected] | ||
googleanalytics.password = googlepassword | ||
googleanalytics.show_downloads = true | ||
``` | ||
googleanalytics.id = UA-XXXXXX-1 | ||
googleanalytics.account = Account name (i.e. data.gov.uk, see top level item at https://www.google.com/analytics) | ||
googleanalytics.username = [email protected] | ||
googleanalytics.password = googlepassword | ||
googleanalytics.show_downloads = true | ||
> **Note**: Your password will probably be readable by other people; so you may want to set up a | ||
new Gmail account with [2fa](https://www.google.com/landing/2step/) enabled specifically for accessing your Gmail profile. | ||
- Restart CKAN to enable google analytics | ||
``` | ||
$ systemctl restart supervisord | ||
``` | ||
systemctl restart supervisord | ||
## Enable dataset rating | ||
|