Skip to main content
Back to Blog
Tutorial

A/B testing with Azure Static Web Apps

Set up traffic splitting for A/B tests on Azure Static Web Apps using PrizmikSwa's visual editor — no JSON editing required.

April 2, 2026 · 5 min read

Azure Static Web Apps supports traffic splitting between environments, which makes A/B testing possible. But configuring it in the Portal means editing raw JSON configuration — error-prone and tedious. PrizmikSwa gives you a visual editor for the entire process.

How traffic splitting works in SWA

Azure Static Web Apps lets you deploy preview environments from pull request branches. Each environment gets its own URL. Traffic splitting lets you route a percentage of your production traffic to a preview environment — perfect for A/B testing.

The configuration lives in the staticwebapp.config.json file and in Azure resource settings. Getting the percentages right and validating the configuration requires careful JSON editing.

Setting up A/B tests with PrizmikSwa

Step 1: Deploy your variant

Create a branch with your variant (new landing page, updated pricing, different CTA), push it, and let your CI deploy it as a preview environment. PrizmikSwa's Environments panel shows all active environments with their URLs and deployment status.

Step 2: Configure traffic splitting

In PrizmikSwa, open the Traffic Splitting panel. You'll see a visual editor where you can:

  • Select which environments participate in the split
  • Drag sliders to set traffic percentages (e.g., 90% production, 10% variant)
  • Preview the configuration before applying

No JSON editing. No risk of a typo breaking your routing.

Step 3: Monitor results

Use the Content Distribution Analytics panel to track traffic to each environment — bandwidth, popular pages, and cache hit ratios. Compare the performance of your variant against the control.

Step 4: Roll out or roll back

If your variant wins, move the slider to 100%. If it doesn't, set it back to 0% and close the preview environment. The entire process is visual and reversible.

Beyond A/B testing

Traffic splitting in SWA is also useful for:

  • Canary deployments — route 5% of traffic to a new version, monitor for errors, then gradually increase
  • Feature flags — use environment-based splitting as a lightweight feature flag system
  • Stakeholder previews — give specific environments to reviewers while keeping production stable

What else PrizmikSwa offers

Beyond traffic splitting, PrizmikSwa provides:

  • Visual Routing Rules Editor — configure routes, redirects, and response overrides visually
  • Auth Wizard — step-by-step authentication configuration for Azure AD, GitHub, Twitter, and custom providers
  • Data API Builder — visual configuration for database connections and REST/GraphQL endpoints
  • Snippets Editor — edit edge functions with syntax highlighting and deployment

All 37 panels and ~61 operations are available in the free Community Edition.

Learn more about PrizmikSwa →

Unify. Focus. Control.

Ready to try Prizmik?

Free for personal and non-commercial use. No signup required.

Download Free