{"id":19845227,"url":"https://github.com/rapidwebltd/php-bucket-testing","last_synced_at":"2025-10-11T13:02:43.189Z","repository":{"id":62533307,"uuid":"85688416","full_name":"rapidwebltd/php-bucket-testing","owner":"rapidwebltd","description":"🆎 PHP Bucket Testing, A/B testing, split testing","archived":false,"fork":false,"pushed_at":"2018-03-21T10:25:39.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-11T12:25:24.686Z","etag":null,"topics":["ab-testing","bucket-testing","php","php-library","split-testing","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapidwebltd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-21T10:25:49.000Z","updated_at":"2019-11-02T19:35:47.000Z","dependencies_parsed_at":"2022-11-02T15:00:54.469Z","dependency_job_id":null,"html_url":"https://github.com/rapidwebltd/php-bucket-testing","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidwebltd%2Fphp-bucket-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidwebltd%2Fphp-bucket-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidwebltd%2Fphp-bucket-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidwebltd%2Fphp-bucket-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapidwebltd","download_url":"https://codeload.github.com/rapidwebltd/php-bucket-testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241224168,"owners_count":19929861,"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":["ab-testing","bucket-testing","php","php-library","split-testing","testing"],"created_at":"2024-11-12T13:06:56.256Z","updated_at":"2025-10-11T13:02:38.148Z","avatar_url":"https://github.com/rapidwebltd.png","language":"PHP","readme":"# PHP Bucket Testing\n\n[![Build Status](https://travis-ci.org/rapidwebltd/php-bucket-testing.svg?branch=master)](https://travis-ci.org/rapidwebltd/php-bucket-testing)\n[![Coverage Status](https://coveralls.io/repos/github/rapidwebltd/php-bucket-testing/badge.svg?branch=master)](https://coveralls.io/github/rapidwebltd/php-bucket-testing?branch=master)\n[![StyleCI](https://styleci.io/repos/85688416/shield?branch=master)](https://styleci.io/repos/85688416)\n\nThis library enables developers to easily redirect users to different URLs, for the purpose \nof bucket testing. Bucket testing is also known as A/B testing or split testing.\n\nThis type of testing is used to test two or more versions of a webpage to determine which one\nperforms better based on specfied key metrics, such as clicks, downloads, purchases or any other\nform of conversion.\n\n## Features\n\n* Random selection of buckets, with optional weights\n* Automatic handling of temporary redirects\n* Ability to retrieve bucket and manually handle URL redirection\n* Easy to use fluent interface syntax\n\n## Installation\nTo install, just run the following composer command.\n\n`composer require rapidwebltd/php-bucket-testing`\n\nRemember to include the `vendor/autoload.php` file if your framework does not already do so.\n\n## Usage\n\n```php\n\nuse \\RapidWeb\\BucketTesting\\BucketManager;\nuse \\RapidWeb\\BucketTesting\\Bucket;\n\n// Create a new bucket manager\n$bucketManager = new BucketManager;\n\n// Add buckets, with URLs and optional weights\n$bucketManager-\u003eadd(new Bucket('https://google.co.uk/'))-\u003ewithWeight(25);\n$bucketManager-\u003eadd(new Bucket('https://php.net/'))-\u003ewithWeight(75);\n\n// Redirect to a randomly selected URL\n$bucketManager-\u003eredirect();\n\n// Or, if you wish, get a random bucket and manually handle the redirection\n$bucket = $bucketManager-\u003egetRandomBucket();\nheader('location: '.$bucket-\u003eurl);\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidwebltd%2Fphp-bucket-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidwebltd%2Fphp-bucket-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidwebltd%2Fphp-bucket-testing/lists"}