Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 817 Bytes

README.md

File metadata and controls

18 lines (10 loc) · 817 Bytes

A module to make integration between your KohanaPHP (v3.x) applications and Google's Analytics API a breeze

Fork of KohAnalytics of matoakley for Kohana 3.2. Use GAPI

Configuration

  1. Create config/kohanalytics.php (or copy from module directory)
  2. Add username, password and report_id data

Using

  1. Statistics for monthes: Kohanalytics::instance()->monthly_visit_count()

You can add custom params $start_date, $end_date and $metrics (by default array('pageviews', 'visits'))

  1. Statistics for days: Kohanalytics::instance()->daily_visit_count()

  2. Custom statistics: Kohanalytics::instance()->query('date', array('pageviews', 'visits'), NULL, 100)