Mobile Testing Variables

If your website is on BranchCMS Plus or higher then you can enable mobile testing. This will test the user agent of the browser that is loading a page on the website and return some basic information about the device.

This feature is a hold-out of the days when developers used to build mobile-specific templates. Because the current best practice for building websites for small screens is responsive design, and because user agents are not always accurate, this mobile detection feature may be removed in the future.

The following variables are available.

Variable Description

The brand name of the mobile device.

The operating system of the device.

The device operating system version.

Whether the device operating system is Android.

Whether mobile detection is enabled.

Whether the device is an iOS device.

Whether the device is a mobile device.

Whether the device is a robot.

Whether the device is a tablet.

The browser name.

The version of the browser.