VWO setup for website A/B testing

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Setting Up VWO for A/B Testing

VWO (Visual Website Optimizer) is a platform for A/B testing, multivariate testing, and personalization. It combines a visual editor (no-code) with developer capabilities.

VWO Installation

<!-- Add synchronously before </head> (important for flicker prevention) -->
<script>
  window.VWO = window.VWO || [];
  VWO.push(["getVariationName", {}]);
</script>
<script type="text/javascript" id="vwoCode">
window._vwo_code=(function() {
  var account_id=ACCOUNT_ID, version=2.1,
  settings_tolerance=2000,hide_element='body',
  /* ... VWO snippet ... */
})();
</script>

VWO recommends adding the snippet before all other scripts for proper anti-flicker.

Creating an A/B Test via API

// VWO JavaScript SDK for server-side testing
const VWO = require('vwo-node-sdk')

const vwoInstance = VWO.launch({
  settingsFile: await getSettingsFile(accountId, sdkKey),
  logger: {
    level: 'ERROR'
  }
})

// Get variant for user
const variantName = vwoInstance.activate(
  'checkout_redesign',  // campaign key
  userId,               // unique user ID
  {
    customVariables: { plan: user.plan },
    variationTargetingVariables: { device: 'mobile' }
  }
)
// variantName = 'Control' | 'Variant1' | null

// Track conversion goal
if (purchaseCompleted) {
  vwoInstance.track(
    'checkout_redesign',
    userId,
    'purchase_completed',
    { revenueValue: orderTotal }
  )
}

Audience Targeting

VWO supports flexible targeting without extra code:

  • URL conditions (contains, matches regex)
  • Cookie values
  • Custom variables (passed via SDK)
  • Geolocation
  • Device type
  • Returning / new visitor
// Pass custom variables for targeting
window.VWO = window.VWO || []
window.VWO.push(['onVariationApplied', function(data) {
  if (data && data[1]) {
    // data[1] = variation number
    gtag('event', 'vwo_experiment', {
      campaign: data[0],
      variation: data[1]
    })
  }
}])

// Set custom variables before test loads
window._vwo_campaignData = {
  user_plan: 'premium',
  cart_value: 5000
}

GA4 Integration

// On variation assignment
window.VWO = window.VWO || []
window.VWO.push(['onVariationApplied', function(data) {
  const campaignId = data[0]
  const variationId = data[1]

  // Send to GA4 as user property
  gtag('set', 'user_properties', {
    [`vwo_${campaignId}`]: variationId
  })

  // Or as event
  gtag('event', 'vwo_assignment', {
    campaign_id: campaignId,
    variation_id: variationId
  })
}])

Heatmaps and Session Recordings in VWO

VWO includes built-in heatmaps and session recordings without an additional tool:

// Programmatically start recording for specific segment
VWO.push(['startRecording', {
  recordFor: 60,  // next 60 seconds
  reason: 'checkout_abandonment'
}])

Velocity: Feature Flags

VWO Feature Rollout for gradual feature release:

const isEnabled = vwoInstance.isFeatureEnabled('new_checkout_flow', userId)
const buttonText = vwoInstance.getFeatureVariableValue(
  'new_checkout_flow',
  'cta_text',
  userId
)

Reports and Significance

VWO shows statistical significance in real-time. Settings:

  • Confidence level: 95% (standard) or 99% for important changes
  • Statistical test: Frequentist (default) or Bayesian (VWO SmartStats)

VWO SmartStats (Bayesian) — probabilistic approach, allows stopping test early without inflated Type I error.

Delivery Time

Installing VWO and creating your first A/B test with GA4 integration — 1 business day. Setting up server SDK with feature flags — additional 1–2 days.