{"id":21392250,"url":"https://github.com/letsjaam/mixpanel-data-export-api","last_synced_at":"2025-07-13T18:31:10.101Z","repository":{"id":56995330,"uuid":"76958619","full_name":"letsjaam/mixpanel-data-export-api","owner":"letsjaam","description":"PHP wrapper for the Mixpanel Data and Export APIs.","archived":false,"fork":false,"pushed_at":"2018-08-16T14:12:14.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T01:41:33.523Z","etag":null,"topics":["mixpanel","mixpanel-api","php","silex"],"latest_commit_sha":null,"homepage":null,"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/letsjaam.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":"2016-12-20T13:24:48.000Z","updated_at":"2018-08-16T14:12:12.000Z","dependencies_parsed_at":"2022-08-21T13:50:40.360Z","dependency_job_id":null,"html_url":"https://github.com/letsjaam/mixpanel-data-export-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/letsjaam/mixpanel-data-export-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsjaam%2Fmixpanel-data-export-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsjaam%2Fmixpanel-data-export-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsjaam%2Fmixpanel-data-export-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsjaam%2Fmixpanel-data-export-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsjaam","download_url":"https://codeload.github.com/letsjaam/mixpanel-data-export-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsjaam%2Fmixpanel-data-export-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186506,"owners_count":23724682,"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":["mixpanel","mixpanel-api","php","silex"],"created_at":"2024-11-22T13:39:43.296Z","updated_at":"2025-07-13T18:31:09.784Z","avatar_url":"https://github.com/letsjaam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mixpanel Data Export API\nThis library wraps the [Mixpanel Data Export API](https://mixpanel.com/help/reference/data-export-api) for PHP.\n\nTo track events and update profiles please see the official [Mixpanel PHP Library](https://github.com/mixpanel/mixpanel-php).\n\n## Installation\n```bash\ncomposer require jaam/mixpanel-data-export-api\n```\n\n## Usage\nThe `Jaam\\Mixpanel\\DataExportApi` class includes two public methods - `data` and `export` - one for each of the Data Export APIs.\n\nFull documentation of every endpoint, their parameters and responses can be found in the [Mixpanel Data Export API documentation](https://mixpanel.com/help/reference/data-export-api).\n\n#### Setup\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\n\nuse Jaam\\Mixpanel\\DataExportApi;\nuse Jaam\\Mixpanel\\DataExportApiException;\n\n$mixpanel = new DataExportApi('YOUR SECRET'); // Secret located in Mixpanel project settings\n```\n\n#### Data API\nSee [Data Export API documentation](https://mixpanel.com/help/reference/data-export-api) for methods, parameters and response examples.\n\n```php\n// Perform setup, as above\ntry {\n    // Retrieve events from `events` endpoint\n    $data = $mixpanel-\u003edata('events', [\n        'event' =\u003e ['event_name'], // Array of event names\n        'type' =\u003e 'unique',\n        'unit' =\u003e 'day',\n        'from_date' =\u003e '2016-12-01',\n        'to_date' =\u003e '2016-12-31'\n    ]);\n\n    // $data is an array\n} catch ( DataExportApiException $e )\n    // Handle exception\n}\n```\n\n#### Export API\nSee [Exporting Raw Data documentation](https://mixpanel.com/help/reference/exporting-raw-data) for parameters and response examples.\n\n```php\n// Perform setup, as above\ntry {\n    // Export raw data\n    $data = $mixpanel-\u003eexport([\n        'from_date' =\u003e '2016-12-01',\n        'to_date' =\u003e '2016-12-31'\n    ]);\n\n    // $data is an array\n} catch ( DataExportApiException $e )\n    // Handle exception\n}\n```\n\n## Silex Integration\nA small integration with [Silex](http://silex.sensiolabs.org/) is provided via `Jaam\\Mixpanel\\Integration\\Silex\\MixpanelDataExportProvider`.\n\n```php\n// Bootstrap Silex app\n\nuse Jaam\\Mixpanel\\Integration\\Silex\\MixpanelDataExportProvider;\n\n$app['mixpanel.api_secret'] = 'YOUR SECRET'; // Secret located in Mixpanel project settings\n$app-\u003eregister(new MixpanelDataExportProvider);\n\n// Use via `mixpanel.api` server later in application\n$data = $app['mixpanel.api']-\u003eexport([\n    'from_date' =\u003e '2016-12-14',\n    'to_date' =\u003e '2016-12-18'\n]);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsjaam%2Fmixpanel-data-export-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsjaam%2Fmixpanel-data-export-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsjaam%2Fmixpanel-data-export-api/lists"}