Seatext library

How to Track Conversions Across Different Language Versions in A/B Tests

Pass the language code and variant ID as custom dimensions to your analytics tool, then use one unified data layer so every language reports into the same experiment view. This lets you compare conversion...

To track conversions across different language versions in an A/B test, send two custom dimensions with every event: the language code (for example, en, de, es) and the variant ID (for example, control or variant_b). Use a single data layer and one experiment view in GA4 or your analytics platform. That way, each language reports into the same test, and you can break down results by language without creating separate experiments.

If you skip this setup, you end up with fragmented data. One language may show a winner while another shows no difference, and you cannot tell whether the change worked or the translation introduced friction. The fix is a consistent tracking contract that every page version follows.

Prerequisites for Cross-Language Conversion Tracking

Before you start, make sure these pieces are in place:

  • One analytics property for the whole site, not separate properties per language.
  • A stable language identifier on every page. Use the hreflang value, the URL subdirectory (like /de/), or a meta tag.
  • A test ID that is the same across languages. If the English test is exp_123, the German version must also report exp_123.
  • A data layer that fires before your analytics tags, so the language and variant values are available on every event.

Step 1: Define One Experiment ID for All Languages

Create a single experiment identifier for the test, regardless of how many languages are involved. For example, a checkout button test might use checkout_cta_v2. Every language version of the page sends that same experiment ID.

Do not create checkout_cta_v2_en and checkout_cta_v2_de as separate experiments. That splits your sample and makes it harder to see whether the change works overall or only in one market.

Step 2: Add Language and Variant as Custom Dimensions

In GA4, create two event-scoped custom dimensions:

  1. page_language — accepts values like en, fr, ja.
  2. experiment_variant — accepts values like control, variant_a, variant_b.

In Google Tag Manager, push these values into the data layer on every page load and on every conversion event. The same two dimensions should be attached to purchase, lead, signup, or other key events.

Step 3: Use One Data Layer Across All Language Versions

Your data layer must have the same structure in every language. A German page should not use sprache while the English page uses language. Keep the keys identical; only the values change.

Example data layer push:

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  'page_language': 'de',
  'experiment_id': 'checkout_cta_v2',
  'experiment_variant': 'variant_b'
});

This consistency is what lets you compare German variant B against English variant B in the same report.

Step 4: Send Conversion Events with the Same Parameters

When a visitor completes a purchase, signs up, or submits a lead form, fire the conversion event with the language and variant parameters included. Do not rely on page-level dimensions alone, because a visitor may start on one language version and convert on another.

For example, a purchase event should include:

  • page_language: the language of the page where the conversion happened
  • experiment_variant: the variant the visitor was assigned to
  • experiment_id: the shared test identifier

Step 5: Build One Exploration Report with a Language Breakdown

In GA4, create an Exploration report that uses experiment_variant as the primary dimension and page_language as a secondary breakdown. Add the conversion event count and conversion rate as metrics.

This gives you a single table where each row is a variant, and each column or nested row is a language. You can see at a glance whether variant B lifts conversions in Spanish but not in Japanese.

Step 6: Verify the Tracking Before You Trust the Results

Run a test conversion on each language version and check the real-time report in GA4. Confirm that:

  • The page_language value matches the page you are on.
  • The experiment_variant value matches the variant you were assigned.
  • The conversion event appears with both dimensions attached.

If any value is missing or wrong, fix the data layer before you collect more data. A tracking error discovered after two weeks of traffic means you have to restart the test.

Common Mistake: Using Separate Experiments per Language

The most frequent error is creating one experiment for English, another for German, and a third for Spanish. This fragments your sample, makes cross-language comparison manual, and often leads to false conclusions because each language test has too few conversions to reach significance.

Instead, keep one experiment with a language dimension. If you need to analyze a single market, filter the report by page_language. You do not lose anything by using one experiment; you gain the ability to compare across markets.

Key Facts About Cross-Language A/B Test Tracking

FactWhat It Means for Your Setup
One experiment ID across languagesAll language versions report into the same test, so you can compare results without manual merging.
Language code as a custom dimensionLets you filter or break down results by market without creating separate tests.
Variant ID as a custom dimensionIdentifies which version the visitor saw, regardless of the page URL or language.
Unified data layerPrevents missing or mismatched values when a visitor switches language mid-session.
Conversion events carry both dimensionsEnsures the conversion is attributed to the correct language and variant even if the visitor navigates across language versions.

When This Approach Does Not Apply

This setup assumes you are running the same test across multiple language versions of the same page or flow. It does not apply when:

  • Each language has a completely different page structure or offer, and you are testing different changes per market.
  • You are using a testing tool that does not support custom dimensions or a shared experiment ID.
  • Your analytics platform cannot attach event-scoped dimensions to conversions.

In those cases, you may need separate experiments per language, but you should still use a shared naming convention so results can be compared manually.

Terminology

Custom dimension: A user-defined field in your analytics tool that holds a value like a language code or variant ID. It lets you segment reports by that value.

Data layer: A JavaScript object that holds structured data about the page and visitor. Tags read from it to send consistent information to analytics tools.

Experiment ID: A stable identifier for a test. All language versions of the same test share this ID.

Variant ID: A value that identifies which version of the page a visitor saw, such as control or variant_b.

Frequently Asked Questions

Why do I need a language dimension if I already have separate URLs per language?

Separate URLs tell you which page the visitor was on, but they do not automatically attach that language to a conversion event. A visitor may land on /de/ and convert on /en/. The language dimension captures the language at the moment of conversion, which is more reliable for analysis.

How do I handle visitors who switch language mid-session?

Update the page_language value in the data layer whenever the visitor changes language. The conversion event then reports the language of the page where the conversion happened, not the language of the first page view.

When should I use separate experiments per language?

Use separate experiments only when the change itself is different per language, such as testing a local payment method in one market and a different CTA in another. If the change is the same, keep one experiment with a language dimension.

What does it cost to set up cross-language tracking?

The setup cost is mostly time. GA4 custom dimensions and Google Tag Manager are free. If you use a paid testing tool, check whether it supports custom dimensions and shared experiment IDs; some enterprise plans include this, while others require a developer to implement it.

What should I compare when evaluating tracking options?

Compare whether the tool supports event-scoped custom dimensions, a shared experiment ID across languages, and a unified data layer. Also check whether you can build a single report with a language breakdown, or whether you would need to export and merge data manually.

How do I know if my tracking is working correctly?

Run a test conversion on each language version and check the real-time report. The language and variant values should match the page and variant you are testing. If they do not, fix the data layer before collecting more data.

Further reading and comparison sources

These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.

How Seatext can help

Seatext's AI A/B Testing Agent generates copy variants and can leave winning versions live automatically. When you combine that with the Website Translation Agent, which translates pages into 125 languages with control, you can run the same test across multiple language versions without a manual localization project. The key requirement is that your analytics setup still needs the language and variant dimensions described above; Seatext handles the variant generation and translation, while your data layer carries the tracking values.