{"id":43700224,"url":"https://github.com/spinbits/google-analytics-4-events-dto-s","last_synced_at":"2026-02-05T05:03:17.063Z","repository":{"id":59391077,"uuid":"536023831","full_name":"spinbits/google-analytics-4-events-dto-s","owner":"spinbits","description":"Implementation of Google Analytics 4 events as DTO's. Events are easy to create and serialize to arrays and jsons.","archived":false,"fork":false,"pushed_at":"2022-12-23T11:49:58.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-23T08:12:50.553Z","etag":null,"topics":["dtos","events","google-analytics","google-analytics-4","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spinbits.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-13T08:10:17.000Z","updated_at":"2023-01-23T20:08:18.000Z","dependencies_parsed_at":"2023-01-30T18:30:50.423Z","dependency_job_id":null,"html_url":"https://github.com/spinbits/google-analytics-4-events-dto-s","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spinbits/google-analytics-4-events-dto-s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbits%2Fgoogle-analytics-4-events-dto-s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbits%2Fgoogle-analytics-4-events-dto-s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbits%2Fgoogle-analytics-4-events-dto-s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbits%2Fgoogle-analytics-4-events-dto-s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spinbits","download_url":"https://codeload.github.com/spinbits/google-analytics-4-events-dto-s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spinbits%2Fgoogle-analytics-4-events-dto-s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29113190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dtos","events","google-analytics","google-analytics-4","php"],"created_at":"2026-02-05T05:03:16.306Z","updated_at":"2026-02-05T05:03:17.056Z","avatar_url":"https://github.com/spinbits.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Google Analytics 4 events DTO's\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Total Downloads][ico-downloads]][link-downloads]\n\n## Need help ?\nDrop us a message hello@spinbits.io\n\n## Description\n\nThis package is implementation of [Google Analytics 4](https://developers.google.com/analytics/devguides/collection/ga4), [events](https://developers.google.com/analytics/devguides/collection/ga4/reference/events).\n\nThis package provides simple interface to build and serialize objects.\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require spinbits/google-analytics-4-events-dto-s\n```\n\n## Example Usage\n\n``` php\n$purchase = new Purchase($order-\u003egetNumber());\n\n$purchase-\u003esetShipping($order-\u003egetShippingTotal());\n$purchase-\u003esetTax($order-\u003egetTaxTotal());\n\n$purchase-\u003eaddItem(new Item('item_id', 'item_name', 1.00, 'USD'));\n\n//get event as array\n$purchase-\u003ejsonSerialize();\n\n//get event as json\n$json = (string) $purchase;\n```\n\nYou can find more examples in tests directory and in this repo: [Google Analytics 4 Enhanced ecommerce Plugin](https://github.com/spinbits/sylius-google-analytics-plugin)\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email office@spinbits.io instead of using the issue tracker.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/spinbits/google-analytics-4-events-dto-s.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/spinbits/google-analytics-4-events-dto-s/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/spinbits/google-analytics-4-events-dto-s.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/spinbits/google-analytics-4-events-dto-s.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/spinbits/google-analytics-4-events-dto-s.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/spinbits/google-analytics-4-events-dto-s\n[link-travis]: https://travis-ci.org/spinbits/google-analytics-4-events-dto-s\n[link-scrutinizer]: https://scrutinizer-ci.com/g/spinbits/google-analytics-4-events-dto-s/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/spinbits/google-analytics-4-events-dto-s\n[link-downloads]: https://packagist.org/packages/spinbits/google-analytics-4-events-dto-s\n[link-author]: https://github.com/spinbits\n[link-contributors]: ../../contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinbits%2Fgoogle-analytics-4-events-dto-s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinbits%2Fgoogle-analytics-4-events-dto-s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinbits%2Fgoogle-analytics-4-events-dto-s/lists"}