PHPackages                             webmarketingroi/optimizely-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. webmarketingroi/optimizely-php

ActiveLibrary

webmarketingroi/optimizely-php
==============================

A PHP wrapper around Optimizely REST API

0.9.0beta9(7y ago)33951MITPHPPHP &gt;=5.3

Since Oct 27Pushed 6y ago4 watchersCompare

[ Source](https://github.com/webmarketingroi/optimizely-php)[ Packagist](https://packagist.org/packages/webmarketingroi/optimizely-php)[ Docs](https://github.com/webmarketingroi/optimizely-php)[ RSS](/packages/webmarketingroi-optimizely-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (11)Used By (0)

optimizely-php
==============

[](#optimizely-php)

[![Build Status](https://camo.githubusercontent.com/bf297e9b52f05376d49cf3e77ebe5bb6ee8a10a4f95b37dda33538b3a69f49d5/68747470733a2f2f7472617669732d63692e6f72672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/webmarketingroi/optimizely-php)[![Code Coverage](https://camo.githubusercontent.com/38a2db3e76d61c0d80bb096cf865abcbb98b828737d94e999f88cd0e6a563f5c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/webmarketingroi/optimizely-php/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/5daa202e1bbe00a19fa78c7e1e8b03da2facce7d33102ea589e4b51e5f5995cd/68747470733a2f2f706f7365722e707567782e6f72672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702f762f737461626c652e737667)](https://packagist.org/packages/webmarketingroi/optimizely-php)[![Total Downloads](https://camo.githubusercontent.com/b1cc078aaff18f588926c2f808807e5556506627b9ae6289f12466659dcd51ab/68747470733a2f2f706f7365722e707567782e6f72672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702f646f776e6c6f6164732e737667)](https://packagist.org/packages/webmarketingroi/optimizely-php)[![Latest Unstable Version](https://camo.githubusercontent.com/4c93dd53b4fe8d13dbd898b31f86e27bf931517b431ba4af8a9f6d7ea324ed6c/68747470733a2f2f706f7365722e707567782e6f72672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702f762f756e737461626c652e737667)](https://packagist.org/packages/webmarketingroi/optimizely-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fee242e610ebc3b4d219033632d4451c5ec0df2ae036c71c1e49fc401cd0d934/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7765626d61726b6574696e67726f692f6f7074696d697a656c792d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webmarketingroi/optimizely-php/?branch=master)

A PHP wrapper library for the Optimizely REST API v2.0 (), proudly created and open sourced by Optimizely Solutions Partner, [Web Marketing ROI](https://www.webmarketingroi.com.au/).

Installation
------------

[](#installation)

This library requires at least version 5.6 of PHP with the `curl` extension installed.

Installing with Composer:

`php composer.phar require webmarketingroi/optimizely-php`

The command above will install the latest stable version. Or, if you prefer a bleeding-edge version, install `dev-master` with the following command:

`php composer.phar require webmarketingroi/optimizely-php dev-master`

Usage
-----

[](#usage)

First, you need to create an instance of the `OptimizelyApiClient` class. You can do that using the following lines of code:

```
