PHPackages                             marcwitteveen/vwo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. marcwitteveen/vwo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marcwitteveen/vwo
=================

Simple PHP helper functions for implementing Visual Website Optimizer within your website.

016PHP

Since Aug 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/marcwitteveen/vwo)[ Packagist](https://packagist.org/packages/marcwitteveen/vwo)[ RSS](/packages/marcwitteveen-vwo/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

vwo
===

[](#vwo)

This class provides some simple PHP helper function for implementing Visual Website Optimizer within your website.

Getting Started
---------------

[](#getting-started)

You can install this package using Composer by adding this line to your composer.json `require` statement.

```
"marcwitteveen/vwo": "dev-master"
```

And then run from terminal:

```
sudo composer update
```

Code Sample
-----------

[](#code-sample)

```
use MarcWitteveen\Vwo\Vwo;

Vwo::asynchronous("xxxxxx", true, $2000, 2500, false);

/* This will render the following code:

window._vwo_code = window._vwo_code || (function(){
var account_id=xxxxxx,
settings_tolerance=2000,
library_tolerance=2500,
use_existing_jquery=false,
is_spa=1,
hide_element='body',

f=false,d=document,code={use_existing_jquery:function(){return use_existing_jquery;},library_tolerance:function(){return library_tolerance;},finish:function(){if(!f){f=true;var a=d.getElementById('_vis_opt_path_hides');if(a)a.parentNode.removeChild(a);}},finished:function(){return f;},load:function(a){var b=d.createElement('script');b.src=a;b.type='text/javascript';b.innerText;b.onerror=function(){_vwo_code.finish();};d.getElementsByTagName('head')[0].appendChild(b);},init:function(){
window.settings_timer=setTimeout('_vwo_code.finish()',settings_tolerance);var a=d.createElement('style'),b=hide_element?hide_element+'{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}':'',h=d.getElementsByTagName('head')[0];a.setAttribute('id','_vis_opt_path_hides');a.setAttribute('type','text/css');if(a.styleSheet)a.styleSheet.cssText=b;else a.appendChild(d.createTextNode(b));h.appendChild(a);this.load('https://dev.visualwebsiteoptimizer.com/j.php?a='+account_id+'&u='+encodeURIComponent(d.URL)+'&f='+(+is_spa)+'&r='+Math.random());return settings_timer; }};window._vwo_settings_timer = code.init(); return code; }());

*/
```

Methods:
--------

[](#methods)

- `Vwo::asynchronous($account_id = "", $enabled = false, $settingsTolerance = 2000, $libraryTolerance = 2500, $useExistingJquery = false)`

`asynchronous` Method
---------------------

[](#asynchronous-method)

#### Description

[](#description)

Renders a asynchronous javascript code snippet, the call needs to be placed as high as possible before the tag.

- `Vwo::synchronous($accountId = "", $enabled = false)`

`synchronous` Method
--------------------

[](#synchronous-method)

#### Description

[](#description-1)

Renders a synchronous javascript code snippet, the call needs to be placed as high as possible before the tag.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4311096b0c9c7dc22d3486baf2a0b7f087ca78b5f8fcd4597f637829db22b65f?d=identicon)[marcwitteveen](/maintainers/marcwitteveen)

---

Top Contributors

[![marcwitteveen](https://avatars.githubusercontent.com/u/555171?v=4)](https://github.com/marcwitteveen "marcwitteveen (5 commits)")

### Embed Badge

![Health badge](/badges/marcwitteveen-vwo/health.svg)

```
[![Health](https://phpackages.com/badges/marcwitteveen-vwo/health.svg)](https://phpackages.com/packages/marcwitteveen-vwo)
```

###  Alternatives

[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688335.4M63](/packages/symfony-polyfill-uuid)[spatie/error-solutions

This is my package error-solutions

6853.2M11](/packages/spatie-error-solutions)[phpflo/phpflo

Flow-based programming for PHP

2173.3k4](/packages/phpflo-phpflo)[eftec/autoloadone

AutoloadOne is a program that generates an autoload class for PHP.

403.4k](/packages/eftec-autoloadone)[ys-tools/default-theme-configuration-bundle

OroCommerce Default Theme Configuration Bundle

124.2k](/packages/ys-tools-default-theme-configuration-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
