{"id":23782559,"url":"https://github.com/roydejong/userkit","last_synced_at":"2026-04-14T06:33:10.836Z","repository":{"id":62537695,"uuid":"81737616","full_name":"roydejong/UserKit","owner":"roydejong","description":"PHP Library for plug-in, local user management \u0026 analytics","archived":false,"fork":false,"pushed_at":"2017-03-05T16:59:54.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T12:17:34.638Z","etag":null,"topics":["analytics","capture","composer","database","insights","php-library","tracking"],"latest_commit_sha":null,"homepage":"http://userkit.roydejong.net","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roydejong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-12T15:54:49.000Z","updated_at":"2017-03-06T16:13:04.000Z","dependencies_parsed_at":"2022-11-02T16:15:34.040Z","dependency_job_id":null,"html_url":"https://github.com/roydejong/UserKit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydejong%2FUserKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydejong%2FUserKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydejong%2FUserKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roydejong%2FUserKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roydejong","download_url":"https://codeload.github.com/roydejong/UserKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239993877,"owners_count":19730778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","capture","composer","database","insights","php-library","tracking"],"created_at":"2025-01-01T12:16:09.644Z","updated_at":"2025-11-11T06:03:03.033Z","avatar_url":"https://github.com/roydejong.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UserKit\n\n### :warning: Heads up\nThe information in this Readme guide is completly provisional; this is a concept project under development. It's not ready for real use yet, at all. So sorry! :broken_heart:\n\n### What is UserKit?\n\n**UserKit is a PHP library for server side analytics that helps you keep track of your users. A powerful drop in user admin panel. It's kind of like Intercom, but completely local.**\n\nHere's some cool stuff you can do with UserKit:\n\n- Customer intelligence: who's using your app, and what are they up to?\n- Track events and custom properties for your users.\n- Segment users get useful insights.\n\n### Getting started\n\n##### Requirements\n\n- PHP 7.1 or newer\n- [Composer](https://getcomposer.org/doc/00-intro.md)\n- A database (MySQL, SQLite, MSSQL or Postgres)\n\n##### Installation\n\nYou can install UserKit via composer. This will set up the library as a dependency and install the autoloader.\n\n    composer require roydejong/userkit\n    \nUserkit currently uses Browscap to collect user agent data, for which you'll need to download up-to-date definitions:\n\n    vendor/bin/browscap-php browscap:update\n    \nAnd that's it. You're ready to start integrating.\n    \n### Integrating into your app\n\nNext, you'll need to integrate UserKit into your app so it can gather analytics.\n\n##### Starting up\n\nWhen your application starts, you'll need to provide your database configuration. Here's what that looks like when you're connecting to a MySQL database:\n\n    UserKit::configure()\n        -\u003esetConnectionString('mysql://user:pass@127.0.0.1/dbname?charset=utf8');\n        \nUserKit will **automatically** install and upgrade itself onto the database you connect it to.\n\nAll of its tables will be prefixed with `userkit_`. You can create a separate database if you'd like, or use your existing database if you don't mind a few extra tables.\n \n##### Gathering basic analytics\n \nTo capture a request, all you need to do is call on the `capture()` method:\n\n    UserKit::capture()\n    \nThis will then capture and log the current request and environment data as a single incoming request, which will start to give you some basic activity data.\n\nYou can enrich your capture with more data to get more useful insights. For example, if a user is logged in, you can attach some data:\n\n    UserKit::capture()\n        -\u003euser([\n            'id' =\u003e 1234,\n            'name' =\u003e 'John Doe',\n            'email' =\u003e 'john.doe@example.com'\n        ])\n        \nNote: You can call `capture()` multiple times to add more data to the capture. Your data will still be logged once. A capture is saved to the database when your script shuts down, or when you manually call `flush()` on the capture object.   \n\n##### Displaying the UserKit admin page\n\nHere's where it gets good: activate UserKit's Web UI to view analytics and get user insights. It only takes a little bit of code:\n\n    UserKit::webui()\n        -\u003eshow()\n        \nUserKit will build and render the UI for you. Simple as that!\n\n**Note:** It's your responsibility to secure this page to protect your users' privacy.  UserKit does not currently provide any authentication functionality.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froydejong%2Fuserkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froydejong%2Fuserkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froydejong%2Fuserkit/lists"}