235 | | |
236 | | |
| 235 | Then the GA code and import: |
| 236 | |
| 237 | {{{ |
| 238 | cd /web/stats.transitionnetwork.org/ |
| 239 | wget http://clearcode.cc/google2piwik-1.2.5.tgz |
| 240 | tar -zxvf google2piwik-1.2.5.tgz |
| 241 | cd google2piwik-1.2.5 |
| 242 | cp google2piwik.conf.sample google2piwik.conf |
| 243 | }}} |
| 244 | |
| 245 | Edit {{{google2piwik.conf}}}: |
| 246 | |
| 247 | {{{ |
| 248 | |
| 249 | ## Google Account Credentials |
| 250 | # If you don't know your site table_id type: |
| 251 | # ./google2piwik.py -p |
| 252 | [google] |
| 253 | user_login = transitiontownsnetwork [at] gmail.com |
| 254 | user_pass = XXX |
| 255 | table_id = ga:XXX |
| 256 | |
| 257 | # MySQL Piwik Database configuration |
| 258 | [mysql] |
| 259 | db = stats |
| 260 | host = localhost |
| 261 | port = 3306 |
| 262 | user = stats |
| 263 | passwd = XXX |
| 264 | table_prefix = |
| 265 | |
| 266 | # Set export date range |
| 267 | [export] |
| 268 | start = 2008-01-01 |
| 269 | end = 2011-06-29 |
| 270 | |
| 271 | ## Piwik configuration of site. |
| 272 | # For default Piwik installation with one website, site_id should be set to 1 |
| 273 | [piwik] |
| 274 | site_id = 1 |
| 275 | site_url = http://transitionnetwork.org |
| 276 | }}} |
| 277 | |
| 278 | Test and backup db: |
| 279 | |
| 280 | {{{ |
| 281 | ./google2piwik.py -p |
| 282 | ./google2piwik.py -c |
| 283 | mysql_backup |
| 284 | }}} |