Search
Clear search
Close search
Google apps
Main menu

Built-in variables for legacy mobile containers

Apps using containers and SDKs lower than version 5 are advised to upgrade to Firebase.

Application

App ID: The value is set to the package name (Android) or bundle ID (iOS).

App Name: The value is set to the name of the currently running application.

App Version Code: The value is set to the version of the currently running application.

SDK Version: The value is set to the SDK version of the operating system in which the application is installed.

Device

Advertiser ID: For Android, the value is set to the Advertising ID. SDK versions prior to v4 will always return "" (empty string). For iOS versions 6+, the value is set to the identifier for advertising (IDFA). For older iOS version the value is set to "" (empty string).

Device Name: The value is set to the device name of the currently running application (e.g. "Samsung Android", "Android SDK built for x86").

Language: The value is set to the two letter language code representing the user-set device language.

OS Version: The value is set to the version of the operating system in which the application is installed.

Platform: The value is set to the platform of the currently running application (one of "Android" or "iOS").

Screen Resolution: The value is set to the screen resolution of the device of the currently running application. The format is "width x height", e.g. "1024x768".

Utilities

Advertiser Tracking Enabled: For Android, this returns true if ad tracking is enabled, or false if the user has opted out of interest-based ads. SDK versions prior to v4 will always return false. For iOS versions 6 and greater, the value is set to the advertisingTrackingEnabled property. Otherwise, the value is set to true.

Container ID: Provides the container's public ID. Example value: GTM-XKCD11

Container Version: Provides the version number of the container, as a string.

Event Name: Returns the event name that caused the trigger to fire.

Random Number: generates a random integer between 0 and 2147483647.

Was this article helpful?
How can we improve it?