https://github.com/wingify/vwo-php-sdk
[DEPRECATED] VWO PHP SDK for server-side A/B Testing
https://github.com/wingify/vwo-php-sdk
murmurhash3 php php-sdk server-side vwo
Last synced: 2 months ago
JSON representation
[DEPRECATED] VWO PHP SDK for server-side A/B Testing
- Host: GitHub
- URL: https://github.com/wingify/vwo-php-sdk
- Owner: wingify
- License: apache-2.0
- Created: 2019-07-30T09:56:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-25T14:10:21.000Z (3 months ago)
- Last Synced: 2025-04-02T10:12:03.006Z (2 months ago)
- Topics: murmurhash3, php, php-sdk, server-side, vwo
- Language: PHP
- Homepage: https://developers.vwo.com/docs/fullstack-overview
- Size: 470 KB
- Stars: 12
- Watchers: 17
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ⚠️ [DEPRECATED] VWO PHP SDK
**⚠️ This project is no longer actively developed. ⚠️**
**✅ We are only fixing critical bugs and security issues.**
**❌ No new features, enhancements, or non-critical updates will be added.**
#### Switch to *VWO Feature Management & Experimentation(FME)* – The Better Alternative! 🚀
VWO’s FME product empowers teams to seamlessly test, release, optimize, and roll back features across their entire tech stack while minimizing risk and maximizing business impact.
* Check out FME developer documentation [here](https://developers.vwo.com/v2/docs/fme-overview).
* Check [this](https://developers.vwo.com/v2/docs/sdks-release-info ) for the list of all FME-supported SDKs.**💡 Need Help?**
For migration assistance or any questions, contact us at [[email protected]]([email protected])------
[](https://packagist.org/packages/vwo/vwo-php-sdk) [](https://github.com/wingify/vwo-php-sdk/actions?query=workflow%3ACI) [](https://coveralls.io/github/wingify/vwo-php-sdk?branch=master) [](http://www.apache.org/licenses/LICENSE-2.0)
This open source library provides you server-side testing capabilities.
## Requirements
> PHP >= 5.6
## Installation
Install the latest version with
```bash
composer require vwo/vwo-php-sdk
```## Basic Usage
**Use the below code for inital setup.**
```php
$settingsFile,
'isDevelopmentMode' => 0, // optional: 1 to enable the dev mode
'logging' => new CustomLogger(), // optional
'userStorageService' => new userStorageService() // optional
];$vwoClient = new VWO($sdkConfig);
// to get the variation name along with add a visitor hit to vwo app stats
$variation = $vwoClient->activate($campaignKey, $userId, $options);
// Or, to get the variation name
$variation = $vwoClient->getVariationName($campaignKey, $userId, $options);// add code here to use variation
//.../**
*send the track api hit to the vwo app stats to increase conversions
* $revenue is optional send in case if there is any revenue inside $options
*/$vwoClient->track($campaignKey, $userId, $goalIdentifier, $options);
```**Code for implementing User Storage Service**
```php
fetch($userId, $campaignKey); // replace with your implementationreturn[
'userId' => $userId,
'campaignKey' => $campaignKey,
'variationName' => $variation
];
}/**
* @param $campaignUserMapping
* @return bool - could be changed
*/
public function set($campaignUserMapping) {
// S...code to store in DB/storage system
return True;
}
}
```**Code for implementing Custom Logger**
```php