Tag mobile Pages using language-agnostic identifiers

Last updated:

Pendo's mobile Page tagging uses language-agnostic identifiers to recognize screens in your app, even when text content changes across locales.

Overview

Language-agnostic identifiers let Pendo recognize mobile app screens using developer-assigned accessibility and test tags instead of visible text, so Page tags remain accurate even when your app is localized.

Instead of relying on visible text strings, Pendo captures accessibility identifiers (iOS) and view/test/Pendo tags (Android) that developers set in code. These values remain consistent regardless of the language a user has selected on their device.

When to use this

Language-agnostic identifiers are useful if your mobile app:

  • Is localized into multiple languages
  • Has experienced Page tag matching failures when visitors switch device language

How it works

Pendo identifies mobile Pages by matching hashed values of the text visible on screen. If a button reads "Submit" in English and "Soumettre" in French, text-based matching treats the same Page as two separate Pages.

Pendo also captures developer-assigned identifiers from your app's view hierarchy and uses them for Page matching. Because these identifiers are set in code rather than derived from display text, they stay the same in every language. When Pendo finds a language-agnostic identifier on an element, it takes precedence over text-based matching. If no identifier is found, Pendo falls back to text-based matching.

Note: To use this feature, you'll need to re-tag your Page or Feature and add the relevant language-agnostic identifiers.

Platform support

Language-agnostic identifiers are supported on native iOS (UIKit and SwiftUI), native Android (XML and Jetpack Compose), React Native, MAUI, and Compose Multiplatform (CMP)/Kotlin Multiplatform (KMP). Flutter isn't included, since it already supports multiple languages without this feature.

iOS

Pendo captures the accessibilityIdentifier property set on UIKit and SwiftUI views. For example:

myButton.accessibilityIdentifier = "submit_button"

No additional SDK configuration is required to collect accessibilityIdentifier values.

Android

Pendo captures viewTag and testTag properties set on XML layouts and Jetpack Compose elements. For example:

android:tag="submit_button"
Modifier.testTag("submit_button")

When an element has more than one identifier, Pendo prioritizes them in this order: Pendo tag, then test tag, then view tag. For more information about Pendo tag, see Advanced settings for mobile Feature tagging.

SDK requirements

Platform Minimum SDK version
iOS 3.12.0
Android 3.12.0

What you'll see in Pendo

In the Page tagging UI, Pendo shows whether a tagged Page rule is based on a language-agnostic identifier or a language-dependent (text-based) identifier. Use this indicator to understand the stability of your Page tags and find Pages that would benefit from a developer-assigned identifier.

Keep identifiers consistent across languages

Important: Keep the values of language-agnostic identifiers, such as accessibilityIdentifier, viewTag, testTag, and Pendo tag, identical across every language your app supports. If a value changes between languages, Pendo can no longer use it to reliably match the Page.

Backward compatibility

Existing Page tags and rules continue to work without any changes required. Language-agnostic identifiers are used in addition to, not instead of, existing text-based matching, and only take precedence when available.

Frequently asked questions

Do I need to add identifiers to every element in my app?

No. Pendo captures identifiers where they already exist in your view hierarchy. Add identifiers only to elements you want to tag, especially ones that are translated into multiple languages. Elements where text-based matching already works reliably don't need any changes.

What happens if a screen has both a language-agnostic identifier and text on the same element?

You can create a custom identifier using the text, the language-agnostic identifier, or both. Pendo shows every identifier it detects so you can choose which one to use.

Will adding a testTag or accessibilityIdentifier value affect my app's behavior?

No. testTag in Jetpack Compose and accessibilityIdentifier in iOS are standard developer attributes widely used for automated testing and accessibility. Adding them has no visible effect on your app's UI or functionality.

I already use Pendo tag. Does anything change for me?

No. Pendo tag continues to work exactly as before. Test tag and view tag are also used for Page matching, in addition to Pendo tag.

Related articles

Was this article helpful?
0 out of 0 found this helpful