Access to Piwik installation.
Google Analytics Account with read or admin rights.
The Google Analytics API currently does not support Google Apps for your Domain Accounts.
Thats why you can't export data from account@yourdomain.com even if you have access via web interface.
However you can still grant privileges to your Gmail account, and use it to perform the export.
Google API key (here you can get one: https://code.google.com/apis/console/).
Python 2.6 with components:
gdata-python-client (Google Python API)
MySQLdb
PyQt4 - GUI version only
Edit `google2piwik.conf` configuration file - you will find a sample in:
google2piwik.conf.sample
Query Google API for getting your site's `table_id` by running:
python google2piwik.py -p
(remember to fill google login and pass configuration before)
Check your configuration and verify privileges by running
./google2piwik.py -c
Create a backup of your Piwik MySQL Database
Set the timezone in Piwik for your site where you import data to UTC
misc/cron/archive.sh
Visitors -> Visitor Log statistics are not reliable.
This one is generated semi-randomly to supply information about Actions (Page views, Bouncy Rate etc.)
Sometimes page `Bouncy Rate` and `Average time on page` may be slightly off to Google Analytics data
Providers are unknown (because Google Analytics does not supply this information)
Actions -> Unique Page views
Visitors -> Settings -> Plugins Google provides only information just about Flash Player and Java enabled.
Because of Google API Policy, there is a limit of requests per 24 hours. Exporter uses google API quota (50k requests/day). Currently this script is using 6 requests (fetching 10 000 data rows) for one exported day, plus 3 for whole period. One additional request (6th) has been added to populate visit numbers and days since last visit tables. It slowed a bit whole process of export. However number of requests depend on number of visits and total number of page views. This means that you should be able to export about 2000 days per 24h in low and medium visited sites.
$ python google2piwikgui.py
Make sure you have all the requirements, including PyQt4
Get pyinstaller
Run:
$ python /path/to/pyinstaller/Configure.py
$ python /path/to/pyinstaller/Makespec.py --onefile Google2Piwik/google2piwikgui.py
$ python /path/to/pyinstaller/Build.py google2piwikgui.spec
Copy Google2Piwik/lib/* to dist/lib/*
Daniel Borzęcki
Piotr Rzepecki
Maciej Zawadziński
Maciej sobczak
We are skilled experts with passion for technology.
And we are eager to share it.
© 2009-2013 Digimedia sp. z o.o. d/b/a Clearcode
ul. Miarki Karola 6-10/44, 50-306 Wrocław
Reg.: ul. Misjonarzy Oblatów MN 3 / 1
40-129 Katowice, Poland
tel.: +13022615220
e-mail: office@clearcode.cc
facebook: clearcode