# VWO Destination Config Reference


> Complete Rudder CLI reference for the VWO destination config keys, experiment reporting, SmartCode settings, and event filtering.



[VWO](https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/) (Visual Website Optimizer) is an A/B testing destination that runs only in web device mode. RudderStack's JavaScript SDK passes `identify` traits and `track` events to VWO in the browser, prefixing each trait and event name with `rudder.`, and can report the variations VWO applies back to RudderStack as events.

In a VWO destination spec:

- `type: vwo`
- `definition_version: 1`

## Sample configuration

```yaml
version: rudder/v1
kind: destination
metadata:
  name: vwo-prod
spec:
  id: vwo-prod
  display_name: VWO Production
  type: vwo
  definition_version: 1
  enabled: true
  config:
    account_id: "{{ .VWO_ACCOUNT_ID }}"

    send_experiment_track: true
    send_experiment_identify: true

    is_spa: true
    library_tolerance: "2500"
    settings_tolerance: "2000"
    use_existing_jquery: false

    event_filtering:
      whitelist:
        - Order Completed
        - Signed Up

    connection_mode:
      web: device
    consent_management:
      web:
        - provider: oneTrust
          consents:
            - analytics
```

The above example sets the SmartCode keys, which take effect only when the page has the SDK load VWO's SmartCode — see [SmartCode settings](#smartcode-settings).

## Config keys

`config` accepts only the keys listed below. The [shared config key rules](https://www.rudderstack.com/docs/rudder-cli/destination-types/#config-key-rules) cover unknown keys, defaults, and immutability.

**Info:** VWO runs only in web device mode. The SDK forwards `identify` and `track` calls to VWO, and also records an `Order Completed` event&#39;s `total` — or `revenue`, when `total` is absent — as a VWO revenue conversion. See [Tracking revenue goals](https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/#tracking-revenue-goals).

### Connection

<div class="rs-ckeys">
<div class="rs-ckey" id="account_id">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">account_id</p>RequiredSecret</div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Your VWO account ID, from <strong>Account Details</strong> in VWO&rsquo;s account settings. The SDK uses it when it loads VWO&rsquo;s SmartCode itself — see <a href="#smartcode-settings" >SmartCode settings</a>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Written as a string, so quote its reference: <code>&quot;{{ .VWO_ACCOUNT_ID }}&quot;</code>. Rudder CLI substitutes the value before it parses the YAML, so an unquoted reference to a numeric ID becomes a number and fails validation.</li>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
<li>A spec that omits this key fails validation with <code>'account_id' is required</code>.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  <p>Supply it as a <code>{{ .VAR }}</code> reference rather than a literal — see <a href="#secrets" >Secrets</a>.</p>
<p>See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/#where-can-i-find-my-vwo-account-id" >Where can I find my VWO Account ID?</a>.</p>

</div>

</div>

</div>

### Experiment reporting

These keys have the SDK report each variation VWO applies to a visitor back to RudderStack, so the other destinations connected to the source can analyze experiment results.

**Warning:** `send_experiment_identify` takes effect only when `send_experiment_track` is also `true` — the SDK listens for applied variations only when `send_experiment_track` is on. Set both to get the identify traits.

<div class="rs-ckeys">
<div class="rs-ckey" id="send_experiment_track">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">send_experiment_track</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Send an <code>Experiment Viewed</code> <code>track</code> event whenever VWO applies a variation, with the experiment ID, campaign name, variation ID, and variation name as properties. The dashboard calls it <strong>Send experiment viewed as track</strong>.
</p>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/#sending-experiment-viewed-as-track-event" >Sending Experiment Viewed as track event</a>.
</div>

</div>

<div class="rs-ckey" id="send_experiment_identify">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">send_experiment_identify</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Send an <code>identify</code> call whenever VWO applies a variation, with a trait named <code>Experiment: &lt;experiment ID&gt;</code> holding the variation name. The dashboard calls it <strong>Send experiment viewed as identify traits</strong>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Takes effect only when <code>send_experiment_track</code> is also <code>true</code>.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  See <a href="https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/#sending-user-traits" >Sending user traits</a>.
</div>

</div>

</div>

### SmartCode settings

These keys configure VWO's SmartCode snippet. The SDK adds SmartCode to the page — with `account_id` and these settings — only when the page's `load` call opts in through its integration options:

```javascript
rudderanalytics.load(WRITE_KEY, DATA_PLANE_URL, {
  integrations: {
    VWO: {
      loadIntegration: true
    }
  }
});
```

Without that option, the SDK expects VWO's SmartCode to be on the page already, and neither `account_id` nor the four keys below have any effect. See [Loading the VWO SDK](https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/#loading-the-vwo-sdk).

<div class="rs-ckeys">
<div class="rs-ckey" id="is_spa">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">is_spa</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Tell SmartCode the page is a single-page application. The dashboard calls it <strong>Single Page Application (SPA)?</strong>.
</p>

</div>

<div class="rs-ckey" id="library_tolerance">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">library_tolerance</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Maximum time, in milliseconds, SmartCode waits for the VWO library to load before it shows the original page. The dashboard calls it <strong>Library Tolerance</strong>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Digits, written as a string: <code>&quot;2500&quot;</code>, not <code>2500</code>. Rudder CLI doesn&rsquo;t check that the value is a number.</li>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
<li>The dashboard defaults this field to <code>2500</code>. Rudder CLI doesn&rsquo;t fill it in.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="settings_tolerance">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">settings_tolerance</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>string</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Maximum time, in milliseconds, SmartCode waits for campaign settings before it shows the original page. The dashboard calls it <strong>Setting Tolerance</strong>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>Digits, written as a string: <code>&quot;2000&quot;</code>, not <code>2000</code>. Rudder CLI doesn&rsquo;t check that the value is a number.</li>
<li>At most 100 characters, and must not contain line breaks.</li>
<li>A <code>{{ path || fallback }}</code> template is accepted in place of a literal.</li>
<li>The dashboard defaults this field to <code>2000</code>. Rudder CLI doesn&rsquo;t fill it in, and without it SmartCode shows the page without waiting for settings.</li>
</ul>

</div>

</div>

<div class="rs-ckey" id="use_existing_jquery">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">use_existing_jquery</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>boolean</code>
  </p><p class="rs-ckey__field">
    Default value:
    <code>false</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Use the jQuery already on the page instead of having VWO add its own. VWO needs jQuery on the page either way. The dashboard calls it <strong>Use Existing jquery</strong>.
</p>

</div>

</div>

### Event filtering

Every source connects to VWO in `device` mode, where the SDK applies the filter, so the filter applies to `track` events from every source you connect.

<div class="rs-ckeys">
<div class="rs-ckey" id="event_filtering">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">event_filtering</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Restricts which <code>track</code> events the SDK passes to VWO, by event name. See <a href="https://www.rudderstack.com/docs/sources/event-streams/sdks/event-filtering/" >Client-side Events Filtering</a>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li><code>whitelist</code> — array of event names to allow; every other <code>track</code> event is dropped.</li>
<li><code>blacklist</code> — array of event names to drop; every other <code>track</code> event is allowed.</li>
<li>The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.</li>
<li>Each name is at most 100 characters, or a <code>{{ path || fallback }}</code> template.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  <div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">event_filtering:
  whitelist:
    - Order Completed</code></pre></div>
</div>
</div>

</div>

</div>

### Per-source keys

Both keys are objects keyed by the local source type — the tokens listed under [Source types](#source-types). A key naming a source type this destination doesn't support fails validation.

<div class="rs-ckeys">
<div class="rs-ckey" id="connection_mode">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">connection_mode</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Maps each source type you connect to the mode its events reach VWO in. VWO accepts only <code>web: device</code>.
</p>

<div class="rs-ckey__notes">
  <p class="rs-ckey__field">Notes:</p>
  <ul>
<li>An entry is required for each source type you connect — see <a href="#connect-a-source" >Connect a source</a>.</li>
</ul>

</div>

<div class="rs-ckey__extra">
  <div class="rs-code">
  <div class="rs-code__head">yaml<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">connection_mode:
  web: device</code></pre></div>
</div>
</div>

</div>

<div class="rs-ckey" id="consent_management">
  <div class="rs-ckey__title">
    <p class="rs-ckey__name">consent_management</p></div>
  <p class="rs-ckey__field">
    Type:
    <code>object</code>
  </p>
<p class="rs-ckey__field">
  Description:
  Consent provider configuration per source type. The entry shape, accepted providers, and the rules on <code>resolution_strategy</code> and <code>consents</code> are shared across all destination types — see <a href="https://www.rudderstack.com/docs/rudder-cli/destination-types/#consent-management" >Consent management</a>.
</p>

</div>

</div>

## Source types

VWO accepts events from these source types in the mentioned connection modes:

| Source type | Connection mode |
| :-----| :-----|
| `web` | `device` |

VWO accepts only web sources, and only in `device` mode — the SDK runs VWO in the browser, and no events pass through RudderStack's servers. See [RudderStack Connection Modes](https://www.rudderstack.com/docs/destinations/rudderstack-connection-modes/).

## Connect a source

An event stream connection to this destination is checked against two rules at `validate` time.

**The source's type must be supported.** VWO accepts only `web`, the type a JavaScript source resolves to. Every other source resolves to a type it doesn't accept — an iOS source to `ios`, an Android source to `android`, and webhook and server-side SDK sources to `cloud` — and reports, for example:

```text
destination 'vwo-prod' (type 'vwo') does not support source 'my-ios-app':
source type 'ios' is not among supported source types: web
```

**The destination config must carry a `connection_mode` entry for that source type.** This lives on the destination spec, not on the [connection spec](https://www.rudderstack.com/docs/rudder-cli/yaml-connections/). Without it:

```text
destination 'vwo-prod' config has no 'connection_mode' entry for source type 'web'
```

VWO needs no additional config keys to connect a web source.

## Secrets

`account_id` is the only secret key. Write it as a `{{ .VAR }}` reference and supply the value at apply time:

```yaml
config:
  account_id: "{{ .VWO_ACCOUNT_ID }}"
```

```bash
export RUDDER_VWO_ACCOUNT_ID="..."
rudder-cli apply

# or
rudder-cli apply --var-file secrets.vars.yaml
```

Note that:

- `rudder-cli import` writes only the secrets the API returns, as `{{ .VAR }}` references, and leaves the others out. Add any secret key it leaves out, then supply the variables before you apply — see [Secrets](https://www.rudderstack.com/docs/rudder-cli/destination-types/#secrets).
- The account ID is embedded in the page's JavaScript, so masking it protects your YAML, not the value itself.

See [How to Use Variable Substitution in Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/variable-substitution/).

## Changes by release

<p>No changes since this type became available.</p>

For changes across every destination type, see [Destination Type Changes by Release](https://www.rudderstack.com/docs/rudder-cli/destination-types/changes/).

## See more

- [VWO Destination](https://www.rudderstack.com/docs/destinations/streaming-destinations/vwo/) for loading SmartCode, experiment reporting, and revenue tracking
- [Destination Type Reference for Rudder CLI](https://www.rudderstack.com/docs/rudder-cli/destination-types/) for the rules shared across destination types
- [Destination YAML Reference](https://www.rudderstack.com/docs/rudder-cli/yaml-destinations/) for the spec envelope

