[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8589":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},8589,"tracker","antonioribeiro\u002Ftracker","antonioribeiro","Laravel Stats Tracker","",null,"PHP",2930,595,122,190,0,1,3,30.33,"MIT License",false,"master",true,[25,26,27,28,29,30,31,32],"laravel","logging","mobile-detection","php","stats","tracking","user-tracker","visitor","2026-06-12 02:01:55","# Laravel Stats Tracker\n\n[![Latest Stable Version](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fv\u002Fpragmarx\u002Ftracker.svg?style=flat-square)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fpragmarx\u002Ftracker) [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-BSD_3_Clause-brightgreen.svg?style=flat-square)](LICENSE) [![Downloads](https:\u002F\u002Fimg.shields.io\u002Fpackagist\u002Fdt\u002Fpragmarx\u002Ftracker.svg?style=flat-square)](https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fpragmarx\u002Ftracker)\n\n### Tracker gathers a lot of information from your requests to identify and store:\n\n- **Sessions**\n- **Page Views (hits on routes)**\n- **Users (logged users)**\n- **Devices** (computer, smartphone, tablet...)\n- **Languages** (preference, language range)\n- **User Devices** (by, yeah, storing a cookie on each device)\n- **Browsers** (Chrome, Mozilla Firefox, Safari, Internet Explorer...)\n- **Operating Systems** (iOS, Mac OS, Linux, Windows...)\n- **Geo Location Data** (Latitute, Longitude, Country and City)\n- **Routes and all its parameters**\n- **Events**\n- **Referers** (url, medium, source, search term...)\n- **Exceptions\u002FErrors**\n- **Sql queries and all its bindings**\n- **Url queries and all its arguments**\n- **Database connections**\n\n## Index\n\n- [Why?](#why)\n- [How To Use It](#usage)\n- [Screenshots](#screenshots)\n- [Blade Views](#views)\n- [Table Schemas](#how-data-is-stored)\n- [System Requirements](#requirements)\n- [Installing](#installing)\n- [Upgrading](upgrading.md)\n- [Changelog](changelog.md)\n- [Contributing](#contributing)\n\n## Why?\n\nStoring user tracking information, on indexed and normalized database tables, wastes less disk space and ease the extract of valuable information about your application and business.\n\n## Usage\n\nAs soon as you install and enable it, Tracker will start storing all information you tell it to, then you can in your application use the Tracker Facade to access everything. Here are some of the methods and relationships available:\n\n#### Current Session\u002FVisitor\n\n```php\n$visitor = Tracker::currentSession();\n```\n\nMost of those methods return an Eloquent model or collection, so you can use not only its attributes, but also relational data:\n\n```php\nvar_dump( $visitor->client_ip );\n\nvar_dump( $visitor->device->is_mobile );\n\nvar_dump( $visitor->device->platform );\n\nvar_dump( $visitor->geoIp->city );\n\nvar_dump( $visitor->language->preference );\n\n```\n\n#### Sessions (visits)\n\n```php\n$sessions = Tracker::sessions(60 * 24); \u002F\u002F get sessions (visits) from the past day\n```\n\n```php\nforeach ($sessions as $session)\n{\n    var_dump( $session->user->email );\n\n    var_dump( $session->device->kind . ' - ' . $session->device->platform );\n\n    var_dump( $session->agent->browser . ' - ' . $session->agent->browser_version );\n\n    var_dump( $session->geoIp->country_name );\n\n    foreach ($session->session->log as $log)\n    {\n    \tvar_dump( $log->path );\n    }\n}\n```\n\n#### Online Users \n\nBrings all online sessions (logged and unlogged users)\n\n```php\n$users = Tracker::onlineUsers(); \u002F\u002F defaults to 3 minutes\n```\n\n#### Users\n\n```php\n$users = Tracker::users(60 * 24);\n```\n\n#### User Devices\n\n```php\n$users = Tracker::userDevices(60 * 24, $user->id);\n```\n\n#### Events\n\n```php\n$events = Tracker::events(60 * 24);\n```\n\n#### Errors\n\n```php\n$errors = Tracker::errors(60 * 24);\n```\n\n#### PageViews summary\n\n```php\n$pageViews = Tracker::pageViews(60 * 24 * 30);\n```\n\n#### PageViews By Country summary\n\n```php\n$pageViews = Tracker::pageViewsByCountry(60 * 24);\n```\n\n#### Filter range\n\nYou can send timestamp ranges to those methods using the Minutes class:\n\n```php\n$range = new Minutes();\n\n$range->setStart(Carbon::now()->subDays(2));\n\n$range->setEnd(Carbon::now()->subDays(1));\n\nTracker::userDevices($range);\n```\n\n#### Routes By Name\n\nHaving a route of\n\n```php\nRoute::get('user\u002F{id}', ['as' => 'user.profile', 'use' => 'UsersController@profile']);\n```\n\nYou can use this method to select all hits on that particular route and count them using Laravel:\n\n```php\nreturn Tracker::logByRouteName('user.profile')\n        ->where(function($query)\n        {\n            $query\n                ->where('parameter', 'id')\n                ->where('value', 1);\n        })\n        ->count();\n```\n\nAnd if you need count how many unique visitors accessed that route, you can do:\n\n```php\nreturn Tracker::logByRouteName('tracker.stats.log')\n        ->where(function($query)\n        {\n            $query\n                ->where('parameter', 'uuid')\n                ->where('value', '8b6faf82-00f1-4db9-88ad-32e58cfb4f9d');\n        })\n        ->select('tracker_log.session_id')\n        ->groupBy('tracker_log.session_id')\n        ->distinct()\n        ->count('tracker_log.session_id');\n```\n\n## Screenshots\n\n### Visits\n\n![visits](https:\u002F\u002Fraw.githubusercontent.com\u002Fantonioribeiro\u002Ftracker\u002Fmaster\u002Fsrc\u002Fviews\u002Fscreenshots\u002Fvisits.png)\n\n### Charts\n\n![charts](https:\u002F\u002Fraw.githubusercontent.com\u002Fantonioribeiro\u002Ftracker\u002Fmaster\u002Fsrc\u002Fviews\u002Fscreenshots\u002Fsummary.png)\n\n### Users\n\n![users](https:\u002F\u002Fraw.githubusercontent.com\u002Fantonioribeiro\u002Ftracker\u002Fmaster\u002Fsrc\u002Fviews\u002Fscreenshots\u002Fusers.png)\n\n### Events\n\n![events](https:\u002F\u002Fraw.githubusercontent.com\u002Fantonioribeiro\u002Ftracker\u002Fmaster\u002Fsrc\u002Fviews\u002Fscreenshots\u002Fevents.png)\n\n### Errors\n\n![errors](https:\u002F\u002Fraw.githubusercontent.com\u002Fantonioribeiro\u002Ftracker\u002Fmaster\u002Fsrc\u002Fviews\u002Fscreenshots\u002Ferrors.png)\n\n## Blade Views\n\nThe views above are available in this package, but you need to install the `sb-admin` panel on your public folder, please look at the instructions below.\n\n## How data is stored\n\nAll tables are prefixed by `tracker_`, and here's an extract of some of them, showing columns and contents:\n\n### sessions\n\n```\n+-----+--------------------------------------+---------+-----------+----------+-----------------+------------+-----------+----------+-------------+\n| id  | uuid                                 | user_id | device_id | agent_id | client_ip       | referer_id | cookie_id | geoip_id | language_id |\n+-----+--------------------------------------+---------+-----------+----------+-----------------+------------+-----------+----------+-------------+\n| 1   | 09465be3-5930-4581-8711-5161f62c4373 | 1       | 1         | 1        | 186.228.127.245 | 2          | 1         | 2        | 3           |\n| 2   | 07399969-0a19-47f0-862d-43b06d7cde45 |         | 2         | 2        | 66.240.192.138  |            | 2         | 2        | 2           |\n+-----+--------------------------------------+---------+-----------+----------+-----------------+------------+-----------+----------+-------------+\n```\n\n### devices\n\n```\n+----+----------+-------------+-------------+------------------+-----------+\n| id | kind     | model       | platform    | platform_version | is_mobile |\n+----+----------+-------------+-------------+------------------+-----------+\n| 1  | Computer | unavailable | Windows 8   |                  |           |\n| 2  | Tablet   | iPad        | iOS         | 7.1.1            | 1         |\n| 3  | Computer | unavailable | Windows XP  |                  |           |\n| 5  | Computer | unavailable | Other       |                  |           |\n| 6  | Computer | unavailable | Windows 7   |                  |           |\n| 7  | Computer | unavailable | Windows 8.1 |                  |           |\n| 8  | Phone    | iPhone      | iOS         | 7.1              | 1         |\n+----+----------+-------------+-------------+------------------+-----------+\n```\n\n### agents\n\n```\n+----+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------+-----------------+\n| id | name                                                                                                                                    | browser           | browser_version |\n+----+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------+-----------------+\n| 1  | Mozilla\u002F5.0 (Windows NT 6.2; WOW64) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F35.0.1916.114 Safari\u002F537.36                           | Chrome            | 35.0.1916       |\n| 2  | Mozilla\u002F5.0 (iPad; CPU OS 7_1_1 like Mac OS X) AppleWebKit\u002F537.51.1 (KHTML, like Gecko) CriOS\u002F34.0.1847.18 Mobile\u002F11D201 Safari\u002F9537.53 | Chrome Mobile iOS | 34.0.1847       |\n| 3  | Mozilla\u002F4.0 (compatible; MSIE 6.0; Windows NT 5.1)                                                                                      | IE                | 6.0             |\n| 4  | Python-urllib\u002F2.6                                                                                                                       | Other             |                 |\n| 5  | Other                                                                                                                                   | Other             |                 |\n| 6  | Mozilla\u002F5.0 (Windows NT 6.1; WOW64) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F34.0.1847.137 Safari\u002F537.36                           | Chrome            | 34.0.1847       |\n| 7  | Mozilla\u002F5.0 (Windows NT 6.3; rv:28.0) Gecko\u002F20100101 Firefox\u002F28.0                                                                       | Firefox           | 28.0            |\n| 8  | Mozilla\u002F5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit\u002F537.51.2 (KHTML, like Gecko) Version\u002F7.0 Mobile\u002F11D169 Safari\u002F9537.53 | Mobile Safari     | 7.0             |\n+----+-----------------------------------------------------------------------------------------------------------------------------------------+-------------------+-----------------+\n```\n\n### languages\n\n```\n+----+------------+----------------+\n| id | preference | language_range |\n+----+------------+----------------+\n| 1  | en         | ru=0.8,es=0.5  |\n| 2  | es         | en=0.7,ru=0.3  |\n| 3  | ru         | en=0.5,es=0.5  |\n+----+------------+----------------+\n```\n\n\n### domains\n\n```\n+----+--------------------------+\n| id | name                     |\n+----+--------------------------+\n| 1  | antoniocarlosribeiro.com |\n+----+--------------------------+\n```\n\n### errors\n\n```\n+----+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| id | code | message                                                                                                                                                                                                                      |\n+----+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| 1  | 404  |                                                                                                                                                                                                                              |\n| 2  | 500  | Call to undefined method PragmaRX\\Tracker\\Tracker::sessionLog()                                                                                                                                                              |\n| 3  | 500  | Trying to get property of non-object (View: \u002Fhome\u002Fforge\u002Fstage.antoniocarlosribeiro.com\u002Fapp\u002Fviews\u002Fadmin\u002Ftracker\u002Flog.blade.php)                                                                                                |\n| 4  | 500  | syntax error, unexpected 'foreach' (T_FOREACH)                                                                                                                                                                               |\n| 5  | 500  | Call to undefined method PragmaRX\\Tracker\\Tracker::pageViewsByCountry()                                                                                                                                                      |\n| 6  | 500  | Class PragmaRX\\Firewall\\Vendor\\Laravel\\Artisan\\Base contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\\Console\\Command::fire)                                 |\n| 7  | 405  |                                                                                                                                                                                                                              |\n| 8  | 500  | Trying to get property of non-object                                                                                                                                                                                         |\n| 9  | 500  | Missing argument 2 for Illuminate\\Database\\Eloquent\\Model::setAttribute(), called in \u002Fhome\u002Fforge\u002Fstage.antoniocarlosribeiro.com\u002Fvendor\u002Flaravel\u002Fframework\u002Fsrc\u002FIlluminate\u002FDatabase\u002FEloquent\u002FModel.php on line 2444 and defined |\n+----+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n```\n\n### events\n\n```\n+----+------------------------------------------------+\n| id | name                                           |\n+----+------------------------------------------------+\n| 1  | illuminate.log                                 |\n| 2  | router.before                                  |\n| 3  | router.matched                                 |\n| 4  | auth.attempt                                   |\n| 5  | auth.login                                     |\n| 6  | composing: admin.tracker.index                 |\n| 7  | creating: admin.tracker._partials.menu         |\n| 8  | composing: admin.tracker._partials.menu        |\n| 9  | creating: admin.layout                         |\n| 10 | composing: admin.layout                        |\n| 11 | creating: admin._partials.mainMenu             |\n| 12 | composing: admin._partials.mainMenu            |\n| 13 | creating: admin._partials.messages             |\n| 14 | composing: admin._partials.messages            |\n| 15 | creating: global._partials.google-analytics    |\n| 16 | composing: global._partials.google-analytics   |\n+----+------------------------------------------------+\n```\n\n### geoip\n\n```\n+----+----------+-----------+--------------+---------------+---------------------------+--------+----------------+-------------+-----------+----------+------------+----------------+\n| id | latitude | longitude | country_code | country_code3 | country_name              | region | city           | postal_code | area_code | dma_code | metro_code | continent_code |\n+----+----------+-----------+--------------+---------------+---------------------------+--------+----------------+-------------+-----------+----------+------------+----------------+\n| 1  | 37.4192  | -122.057  | US           | USA           | United States             | CA     | Mountain View  | 94043       | 650       | 807      | 807        | NA             |\n| 2  | -10      | -55       | BR           | BRA           | Brazil                    |        |                |             |           |          |            | SA             |\n| 3  | 30.3909  | -86.3161  | US           | USA           | United States             | FL     | Miramar Beach  | 32550       | 850       | 686      | 686        | NA             |\n| 4  | 38.65    | -90.5334  | US           | USA           | United States             | MO     | Chesterfield   | 63017       | 314       | 609      | 609        | NA             |\n| 5  | 42.7257  | -84.636   | US           | USA           | United States             | MI     | Lansing        | 48917       | 517       | 551      | 551        | NA             |\n| 6  | 42.8884  | -78.8761  | US           | USA           | United States             | NY     | Buffalo        | 14202       | 716       | 514      | 514        | NA             |\n| 7  | 40.1545  | -75.3809  | US           | USA           | United States             | PA     | Norristown     | 19403       | 610       | 504      | 504        | NA             |\n| 8  | 47.4891  | -122.291  | US           | USA           | United States             | WA     | Seattle        | 98168       | 206       | 819      | 819        | NA             |\n| 9  | 33.7516  | -84.3915  | US           | USA           | United States             | GA     | Atlanta        | 30303       | 404       | 524      | 524        | NA             |\n| 10 | 33.7633  | -117.794  | US           | USA           | United States             | CA     | Santa Ana      | 92705       | 714       | 803      | 803        | NA             |\n| 11 | 33.4357  | -111.917  | US           | USA           | United States             | AZ     | Tempe          | 85281       | 480       | 753      | 753        | NA             |\n| 12 | 40.7421  | -74.0018  | US           | USA           | United States             | NY     | New York       | 10011       | 212       | 501      | 501        | NA             |\n| 13 | 28.6185  | -81.4336  | US           | USA           | United States             | FL     | Orlando        | 32810       | 407       | 534      | 534        | NA             |\n| 14 | 38.6312  | -90.1922  | US           | USA           | United States             | MO     | Saint Louis    | 63101       | 314       | 609      | 609        | NA             |\n| 15 | 51       | 9         | DE           | DEU           | Germany                   |        |                |             |           |          |            | EU             |\n| 16 | 52.5     | 5.75      | NL           | NLD           | Netherlands               |        |                |             |           |          |            | EU             |\n| 17 | 48.86    | 2.35      | FR           | FRA           | France                    |        |                |             |           |          |            | EU             |\n| 18 | 60       | 100       | RU           | RUS           | Russian Federation        |        |                |             |           |          |            | EU             |\n| 19 | 51.5     | -0.13     | GB           | GBR           | United Kingdom            |        |                |             |           |          |            | EU             |\n| 20 | 42.8333  | 12.8333   | IT           | ITA           | Italy                     |        |                |             |           |          |            | EU             |\n| 21 | 59.3333  | 18.05     | SE           | SWE           | Sweden                    | 26     | Stockholm      |             |           |          |            | EU             |\n| 22 | -41      | 174       | NZ           | NZL           | New Zealand               |        |                |             |           |          |            | OC             |\n| 23 | 37.57    | 126.98    | KR           | KOR           | Korea, Republic of        |        |                |             |           |          |            | AS             |\n| 24 | 1.3667   | 103.8     | SG           | SGP           | Singapore                 |        |                |             |           |          |            | AS             |\n| 25 | -43.5333 | 172.633   | NZ           | NZL           | New Zealand               | E9     | Christchurch   | 8023        |           |          |            | OC             |\n| 26 | -27.471  | 153.024   | AU           | AUS           | Australia                 | 04     | Brisbane       |             |           |          |            | OC             |\n| 27 | 26.9167  | 75.8167   | IN           | IND           | India                     | 24     | Jaipur         |             |           |          |            | AS             |\n| 28 | 32       | 53        | IR           | IRN           | Iran, Islamic Republic of |        |                |             |           |          |            | AS             |\n| 29 | 32.0617  | 118.778   | CN           | CHN           | China                     | 04     | Nanjing        |             |           |          |            | AS             |\n| 30 | -22.9    | -47.0833  | BR           | BRA           | Brazil                    | 27     | Campinas       |             |           |          |            | SA             |\n| 31 | 32.8073  | -117.132  | US           | USA           | United States             | CA     | San Diego      | 92123       | 858       | 825      | 825        | NA             |\n| 32 | -22.9    | -43.2333  | BR           | BRA           | Brazil                    | 21     | Rio De Janeiro |             |           |          |            | SA             |\n+----+----------+-----------+--------------+---------------+---------------------------+--------+----------------+-------------+-----------+----------+------------+----------------+\n```\n\n### log\n\n```\n+-----+------------+---------+----------+--------+---------------+---------+-----------+---------+------------+----------+\n| id  | session_id | path_id | query_id | method | route_path_id | is_ajax | is_secure | is_json | wants_json | error_id |\n+-----+------------+---------+----------+--------+---------------+---------+-----------+---------+------------+----------+\n| 1   | 1          | 1       |          | GET    | 1             |         | 1         |         |            |          |\n| 2   | 1          | 2       |          | GET    | 2             |         | 1         |         |            |          |\n| 3   | 1          | 3       |          | GET    | 3             |         | 1         |         |            |          |\n| 4   | 1          | 3       |          | POST   | 4             |         | 1         |         |            |          |\n+-----+------------+---------+----------+--------+---------------+---------+-----------+---------+------------+----------+\n```\n\n### paths\n\n```\n+----+--------------------------------------------------------+\n| id | path                                                   |\n+----+--------------------------------------------------------+\n| 1  | \u002F                                                      |\n| 2  | admin                                                  |\n| 3  | login                                                  |\n| 4  | admin\u002Flanguages                                        |\n| 5  | admin\u002Ftracker                                          |\n| 6  | admin\u002Fpages                                            |\n| 7  | jmx-console                                            |\n| 8  | manager\u002Fhtml                                           |\n| 9  | administrator                                          |\n| 10 | joomla\u002Fadministrator                                   |\n| 11 | cms\u002Fadministrator                                      |\n| 12 | Joomla\u002Fadministrator                                   |\n| 13 | phpmyadmin                                             |\n| 14 | phpMyAdmin                                             |\n| 15 | mysql                                                  |\n| 16 | sql                                                    |\n| 17 | myadmin                                                |\n| 18 | webdav                                                 |\n+----+--------------------------------------------------------+\n```\n\n### route_paths\n\n```\n+----+----------+--------------------------------------------------------+\n| id | route_id | path                                                   |\n+----+----------+--------------------------------------------------------+\n| 1  | 1        | \u002F                                                      |\n| 2  | 2        | admin                                                  |\n| 3  | 3        | login                                                  |\n| 4  | 4        | login                                                  |\n| 5  | 5        | admin\u002Flanguages                                        |\n| 6  | 6        | admin\u002Ftracker                                          |\n| 7  | 7        | admin\u002Fpages                                            |\n+----+----------+--------------------------------------------------------+\n```\n\n### routes\n\n```\n+----+--------------------------------------+----------------------------------------------------------+\n| id | name                                 | action                                                   |\n+----+--------------------------------------+----------------------------------------------------------+\n| 1  | home                                 | ACR\\Controllers\\Home@index                               |\n| 2  | admin                                | ACR\\Controllers\\Admin\\Admin@index                        |\n| 3  | login.form                           | ACR\\Controllers\\Logon@form                               |\n| 4  | login.do                             | ACR\\Controllers\\Logon@login                              |\n| 5  | admin.languages.index                | ACR\\Controllers\\Admin\\Languages@index                    |\n| 6  | admin.tracker.index                  | ACR\\Controllers\\Admin\\Tracker@index                      |\n| 7  | admin.pages.index                    | ACR\\Controllers\\Admin\\Pages@index                        |\n| 8  | admin.tracker.log                    | ACR\\Controllers\\Admin\\Tracker@log                        |\n| 9  | technology                           | ACR\\Controllers\\Technology@index                         |\n| 10 | technology.articles.show             | ACR\\Controllers\\Technology@show                          |\n| 11 | language.select                      | ACR\\Controllers\\Language@select                          |\n| 12 | admin.tracker.summary                | ACR\\Controllers\\Admin\\Tracker@summary                    |\n| 13 | admin.tracker.api.pageviews          | ACR\\Controllers\\Admin\\Tracker@apiPageviews               |\n| 14 | admin.tracker.api.pageviewsbycountry | ACR\\Controllers\\Admin\\Tracker@apiPageviewsByCountry      |\n| 15 | admin.pages.create                   | ACR\\Controllers\\Admin\\Pages@create                       |\n| 16 | api.markdown                         | ACR\\Controllers\\Api@markdown                             |\n| 17 | admin.pages.store                    | ACR\\Controllers\\Admin\\Pages@store                        |\n| 18 | bio                                  | ACR\\Controllers\\StaticPages@show                         |\n| 19 | logout.do                            | ACR\\Controllers\\Logon@logout                             |\n| 20 | admin.tracker.index                  | ACR\\Controllers\\Admin\\UsageTracker@index                 |\n| 21 | admin.tracker.api.pageviewsbycountry | ACR\\Controllers\\Admin\\UsageTracker@apiPageviewsByCountry |\n| 22 | admin.tracker.api.pageviews          | ACR\\Controllers\\Admin\\UsageTracker@apiPageviews          |\n+----+--------------------------------------+----------------------------------------------------------+\n```\n\n### sql_queries                   ;\n\n```\n+----+------------------------------------------+-------------------------------------------------------------------------------------------------+-------+---------------+\n| id | sha1                                     | statement                                                                                       | time  | connection_id |\n+----+------------------------------------------+-------------------------------------------------------------------------------------------------+-------+---------------+\n| 1  | 5aee121018ac16dbf26dbbe0cf35fd44a29a5d7e | select * from \"users\" where \"id\" = ? limit 1                                                    | 3.13  | 1             |\n| 2  | 0fc3f3a722b0f9ef38e6bee44fc3fde9fb1fd1d9 | select \"created_at\" from \"articles\" where \"published_at\" is not null order by \"created_at\" desc | 1.99  | 1             |\n+----+------------------------------------------+-------------------------------------------------------------------------------------------------+-------+---------------+\n```\n\n## Manually log things\n\nIf your application has special needs, you can manually log things like:\n\n#### Events  \n\n```php\nTracker::trackEvent(['event' => 'cart.add']);\nTracker::trackEvent(['event' => 'cart.add', 'object' => 'App\\Cart\\Events\\Add']);\n```\n\n#### Routes\n\n```php\nTracker::trackVisit(\n    [\n        'name' => 'my.dynamic.route.name',\n        'action' => 'MyDynamic@url'\n    ],\n    ['path' => 'my\u002Fdynamic\u002Furl']\n);\n```\n\n## Requirements\n\n- Laravel 5+\n- PHP 5.3.7+\n- Package \"geoip\u002Fgeoip\":\"~1.14\" or \"geoip2\u002Fgeoip2\":\"~2.0\"\n  (If you are planning to store Geo IP information)\n\nFor Laravel 4+ please use version 2.0.10.\n\n## Installing\n\n#### Require the `tracker` package by **executing** the following command in your command line:\n\n    composer require pragmarx\u002Ftracker\n\n#### Add the service provider to your app\u002Fconfig\u002Fapp.php:\n\n```php\n PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider::class,\n```\n\n#### Add the alias to the facade on your app\u002Fconfig\u002Fapp.php:\n\n```php\n'Tracker' => 'PragmaRX\\Tracker\\Vendor\\Laravel\\Facade',\n```\n\n#### Publish tracker configuration:\n\n**Laravel 4**\n\n    php artisan config:publish pragmarx\u002Ftracker\n\n**Laravel 5**\n\n    php artisan vendor:publish --provider=\"PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider\"\n\n#### Enable the Middleware (Laravel 5)\n\nOpen the newly published config file found at `app\u002Fconfig\u002Ftracker.php` and enable `use_middleware`:\n\n```php\n'use_middleware' => true,\n```\n\n#### Add the Middleware to Laravel Kernel (Laravel 5)\n\nOpen the file `app\u002FHttp\u002FKernel.php` and add the following to your web middlewares:\n\n```php\n\\PragmaRX\\Tracker\\Vendor\\Laravel\\Middlewares\\Tracker::class,\n```\n\n#### Enable Tracker in your config.php (Laravel 4) or tracker.php (Laravel 5)\n\n```php\n'enabled' => true,\n```\n\n#### Publish the migration\n\n    php artisan tracker:tables\n\nThis is only needed if you are on Laravel 4, because `vendor:publish` does it for you in Laravel 5.\n\n#### Create a database connection for it on your `config\u002Fdatabase.php`\n\n```php\n'connections' => [\n    'mysql' => [\n        ...\n    ],\n    \n    'tracker' => [\n    \t'driver'   => '...',\n    \t'host'     => '...',\n    \t'database' => ...,\n        'strict' => false,    \u002F\u002F to avoid problems on some MySQL installs\n    \t...\n    ],\n],\n```\n\n#### Migrate it\n\nIf you have set the default connection to `tracker`, you can\n\n    php artisan migrate\n\nOtherwise you'll have to\n\n    php artisan migrate --database=tracker\n\n#### If you are planning to store Geo IP information, also install the geoip package:\n\n    composer require \"geoip\u002Fgeoip\":\"~1.14\"\n\n    or\n\n    composer require \"geoip2\u002Fgeoip2\":\"~2.0\"\n\n#### And make sure you don't have the PHP module installed. This is a Debian\u002FUbuntu example:\n\n\tsudo apt-get purge php5-geoip\n\n## Everything Is Disabled By Default\n\nTracker has a lot of logging options, but you need to decide what you want to log. Starting by enabling this one:\n\n```php\n'log_enabled' => true,\n```\n\nIt is responsible for logging page hits and sessions, basically the client IP address.\n\n## Multiple authentication drivers\n\nYou just have to all your auth IOC bidings to the array:\n\n```php\n'authentication_ioc_binding' => ['auth', 'admin'],\n```\n\n## Stats Panel\n\nTo use the stats panel on your website you'll need to download the sb-admin 2 sources to your public folder:\n\n    git clone https:\u002F\u002Fgithub.com\u002FBlackrockDigital\u002Fstartbootstrap-sb-admin-2.git public\u002Ftemplates\u002Fsb-admin-2\n    cd public\u002Ftemplates\u002Fsb-admin-2\n    git checkout tags\u002Fv3.3.7+1\n    git checkout -b v3.3.7+1\n\nAnd enabled in your config file:\n\n```php\n'stats_panel_enabled' => true,\n```\n\nSet the web middleware for stats routes (Laravel 5)\n\n```php\n'stats_routes_middleware' => 'web',\n```\n\nOnly admins can view the stats, so if you don't have an is_admin attribute on your user model, you'll have to add one:\n\n```php\npublic function getIsAdminAttribute()\n{\n    return true;\n}\n```\n\nIt can be 'admin', 'is_admin', 'root' or 'is_root'.\n\n## Troubleshooting\n\n### Is everything enabled?\n\nMake sure Tracker is enabled in the config file. Usually this is the source of most problems.\n\n### Tail your laravel.log file\n\n``` php\ntail -f storage\u002Flogs\u002Flaravel.log\n``` \n\nUsually non-trackable IP addresses and other messages will appear in the log:\n\n```\n[2018-03-19 21:28:08] local.WARNING: TRACKER (unable to track item): 127.0.0.1 is not trackable.\n```\n\n### SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'field name' \n\nThis is probably related to SQL modes on MySQL, specifically with `NO_ZERO_IN_DATE` and `NO_ZERO_DATE` modes:\n\nhttps:\u002F\u002Fstackoverflow.com\u002Fquestions\u002F36882149\u002Ferror-1067-42000-invalid-default-value-for-created-at\n\n\nBecause Laravel's defaults to  \n\n```sql\nset session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'\n```\n\nYou may need to change your Tracker database connection configuration to\n\n```php\n'connections' => [\n    ...\n\n    'tracker' => [\n        ...\n\n        'strict'    => false,\n    ],\n],\n\n```\n\n## Not able to track users?\n\nIf you get an error like:\n\n    Base table or view not found: 1146 Table 'tracker.users' doesn't exist\n\nYou probably need to change: \n\n    'user_model' => 'PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\User',\n\nTo create (or use a current) a User model:\n\n    'user_model' => 'App\\TrackerUser',\n\nAnd configure the Connection related to your users table:\n\n    protected $connection = 'mysql';\n    \n## Not able to track API's?\n\nIn your kernel \n\n    protected $middlewareGroups = [\n        'web' => [\n            .......\n            \\PragmaRX\\Tracker\\Vendor\\Laravel\\Middlewares\\Tracker::class,\n        ],\n\n        'api' => [\n           .......\n            \\PragmaRX\\Tracker\\Vendor\\Laravel\\Middlewares\\Tracker::class,\n        ],\n    ];\n\n\n## Author\n\n[Antonio Carlos Ribeiro](http:\u002F\u002Ftwitter.com\u002Fiantonioribeiro)\n[All Contributors](https:\u002F\u002Fgithub.com\u002Fantonioribeiro\u002Ftracker\u002Fgraphs\u002Fcontributors)\n\n## License\n\nTracker is licensed under the BSD 3-Clause License - see the `LICENSE` file for details\n\n## Contributing\n\nPull requests and issues are more than welcome.\n","Laravel Stats Tracker 是一个用于 Laravel 应用的统计追踪工具。它能够收集包括会话、页面浏览量、用户设备信息、浏览器类型、操作系统、地理位置数据等在内的多种信息，并将这些数据存储在结构化和规范化的数据库表中，从而节省磁盘空间并便于提取有价值的应用程序和业务洞察。该项目支持对移动设备进行检测，记录用户行为事件及异常错误，同时提供了灵活的数据访问接口，方便开发者通过 Facade 调用来获取所需的信息。适用于需要详细分析网站或应用访问情况、优化用户体验以及进行精准营销策略制定的各种场景。",2,"2026-06-11 03:18:45","top_language"]