Using AB Split Test with Weglot (multilingual sites)
AB Split Test works on Weglot sites without any setup. Most features behave exactly as they do on a single-language site, because Weglot serves /es/your-page/ as the same WordPress page as /your-page/, and AB Split Test tracks tests by page.
There are three things to plan around:
- Full page tests send translated visitors to the original-language variation.
- Magic (point-and-click) tests show the variation text in the language you wrote it in.
- Text goals and full-URL goals don’t fire on translated pages.
Everything below was tested with Weglot’s WordPress plugin (version 6.4) in subdirectory mode (/es/, /fr/, and so on).
What works on translated pages
| Feature | On translated pages | Notes |
|---|---|---|
On-page testsBlocks, shortcodes, page builders, ab-var- classes |
Works | Every variation is in the page HTML, so Weglot translates each one. |
| Page goals and visits | Works | Results combine all languages (see below). |
| Selector and click goals | Works | Not affected by language. |
Relative URL goalsthank-you or /thank-you |
Works | /es/thank-you/ still contains thank-you. |
| WooCommerce order goals | Works | Not affected by language. |
| Heatmaps, session replays, journeys | Works | All languages are combined. The viewers show the original-language page. |
| Full page tests | Partly | The test runs on /es/ pages, but visitors assigned a variation are redirected to the original-language version of it. |
| Magic (point-and-click) tests | No | Variation text shows in the language you wrote it in. |
Full-URL goalshttps://example.com/thank-you |
No | Never fire on /es/ pages. Use a relative URL instead. |
URL goals with a translated slug/es/gracias/ |
No | Never fire. Use a page goal instead. |
| Text on page goals, order value “by label” | No | They look for your original-language text, which has been translated. |
Full page tests redirect to the original language
A full page test saves each variation’s address in your site’s original language. When a visitor on /es/landing/ is assigned variation B, they are sent to /landing-b/, not /es/landing-b/. Weglot doesn’t translate addresses inside scripts, so the language prefix is lost.
If Weglot’s Auto redirect setting is on, visitors whose browser language is Spanish are bounced back to /es/landing-b/. They end up on the right page with one extra redirect. Visitors who picked Spanish in the language switcher but have a different browser language stay on the original-language page.
What to do: pick one of these.
- Test your original language only. Open the test’s Settings > Test Visitor Segmentation > URL Filtering and add
NOT */es/*(one line per language). Translated pages are left alone. - Run one test per language. Exclude translated pages from your main test as above, then create a separate full page test for each language with its own translated variation pages, filtered to
*/es/*.
Magic tests show untranslated text
Magic tests change the page in the visitor’s browser after Weglot has already translated it. The variation text you typed is shown as written, so a Spanish visitor sees your English headline.
- Use an on-page test instead. Each variation is part of the page, so Weglot translates it like any other content.
- Or exclude translated pages from the Magic test with
NOT */es/*in URL Filtering. - If you create a Magic test while viewing a translated page, the translated text becomes the “original”, and the test also runs on the original-language page.
Up to version 2.6.13, a visitor’s first page view in the original (control) version could also replace Weglot’s translation of that element with your original-language text. This is fixed in the upcoming 2.6.14 update: control visitors now keep Weglot’s translation.
Conversion goals on translated pages
- Best: page goals, selector goals and click goals. These don’t depend on language.
- URL goals: write them as relative paths (
thank-you), not full addresses (https://example.com/thank-you). If Weglot translates the slug (/es/gracias/), use a page goal instead. - Avoid: text on page goals and order value “by label”. Your original-language phrase won’t be on the translated page.
Results combine all languages
Translated and original pages are the same page to AB Split Test, so a test’s results include every language. To see one language on its own, create an audience with a URL rule such as */es/*. It appears as a filtered view inside the test’s results.
Weglot subdomains and custom domains
Language subdomains (es.example.com) and custom domains are served by Weglot’s hosted proxy, not the WordPress plugin. We haven’t tested this setup. Based on how the plugin works, expect these limits:
- Visits and conversions from the language subdomain may not be recorded, because tracking requests from a different domain are rejected.
- Moving between
es.example.comandexample.comcounts as a new session from an external referrer. - Full page tests send subdomain visitors to the main-domain variation.
If you use Weglot subdomains, contact support before running a test.
Quick checklist
- Prefer on-page tests over Magic tests on translated pages.
- Use page, selector or click goals. Write URL goals as relative paths.
- Add
NOT */es/*to full page and Magic tests unless you’re running one test per language. - Add an audience per language if you want results split by language.
Related: Segmentation / Targeting · How to Set Up a Full Page Split Test · Magic Mode: point-and-click tests