> ## Documentation Index
> Fetch the complete documentation index at: https://docs.germainux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Battery Level Monitoring

> GermainUX RUM JS can monitor the battery status reported by supported browsers and create an event when the level changes.

Components
[`JS Profiler`](/main/germain-ux-js-profiler)
[`RUM JS`](/main/germain-ux-rum-js)
[`RUM Extension`](/main/germain-ux-rum-extension)

Availability
2017.1 or later

Browser support
only latest Chrome, Edge and Opera

> **[Benefits](#benefits)**
>
> What battery monitoring delivers

> **[Customize the battery threshold](#customize-the-battery-threshold)**
>
> Change the default 15% threshold

> **[Privacy](#privacy)**
>
> Fingerprinting risk and safeguards

> **[Deployment and configuration](#deployment-and-configuration)**
>
> Deploy and configure battery checks

## Overview

GermainUX RUM JS can monitor the battery status reported by supported browsers and create an event when:

* The battery level reaches or falls below a configured threshold.
* The device’s charging status changes.

Battery events provide additional context for understanding the experience of mobile, field, and laptop users.

## Benefits

Battery-Level Monitoring can help teams:

* Identify sessions affected by a low battery level.
* Understand whether a device was charging or running on battery.
* Correlate battery conditions with user activity, application performance, and workflow completion.
* Analyze battery-status changes across users, devices, pages, and business processes.
* Notify interested GermainUX users when a relevant battery condition is detected.
* Create customer-specific analytics for mobile and field-work scenarios.

## Preconfigured monitoring

Battery monitoring is preconfigured in GermainUX RUM JS with a default low-battery threshold of **15%**.

When supported by the browser, GermainUX can create events for:

| Event | Description |
| - | - |
| Low Battery Level | Battery charge reaches or falls below the configured threshold |
| Battery Charging Status Changed | The device changes between charging and not charging |

No customization is required when the default threshold meets the organization’s requirements.

## Collected information

Depending on browser support and the event type, a battery event can include:

* Battery level
* Charging status
* Event timestamp
* User session
* Application
* Page or route

> **Show all 9**
>
> * Browser
> * Device and operating-system context
> * Other authorized session metadata

Battery data can be analyzed alongside user activity, errors, performance, and business-process events.

## Customize the battery threshold

Customize the threshold only when the default value of 15% does not meet the monitoring requirement.

The following example creates a low-battery event when the battery level reaches or falls below 30%:

```javascript theme={null}
const settings = germainApm.getDefaultSettings();

// Create a battery-level event at or below 30%.
settings.plugins.battery.levelThreshold = 30;

germainApm.start(settings);
```

The value represents a percentage and must be configured between `0` and `100`.

## Analysis

Battery events can be analyzed using measures such as:

* Event count
* Unique users affected
* Unique sessions affected
* Battery level
* Charging-status changes

Results can be segmented by pivots such as:

* Application
* Page or route
* User
* Role or team
* Browser
* Device

> **Show all 10**
>
> * Operating system
> * Environment
> * Business process
> * Time period

Battery events can also be reviewed within the associated user session and correlated with other available GermainUX insights.

## Notifications

A low-battery or charging-status event can be used to:

* Trigger an alert when a configured SLA is violated.
* Notify interested GermainUX users through a Watch.
* Include battery insights in a dashboard or report.
* Initiate an approved customer-specific workflow.

A Watch notifies users about a battery insight already detected by GermainUX; it does not create a new insight.

## Browser support and limitations

Battery monitoring depends on the browser’s Battery Status API.

The documented GermainUX capability is available in supported versions of Chromium-based browsers, including:

* Google Chrome
* Microsoft Edge
* Opera

Browser vendors can restrict or discontinue access to battery information for privacy and fingerprinting protection. Always validate availability with the browser versions used by the monitored population.

Battery-Level Monitoring does not:

* Measure the application’s exact battery consumption.
* Prove that the monitored application caused the battery to discharge.
* Provide operating-system-level battery diagnostics.
* Work on every browser or device.
* Continue collecting after the browser or monitored page closes.

Treat battery status as contextual evidence rather than proof of application battery usage.

## Privacy

Battery information can contribute to device fingerprinting when combined with other attributes.

Before enabling production monitoring:

* Confirm that battery-status collection is permitted.
* Collect only the information required for the approved use case.
* Avoid combining battery data with unnecessary personal or device identifiers.
* Restrict access to individual user and session data.
* Apply the organization’s retention and privacy policies.
* Disable battery monitoring when it is not required.

## Validation

Follow these validation steps:

**1. Open the monitored application in a supported browser on a battery-powered device**

**2. Confirm that GermainUX RUM JS is running**

**3. Temporarily configure a threshold above the device’s current battery level**

**4. Reload the monitored application or reproduce the relevant battery event**

**5. Confirm that a battery-level fact appears in GermainUX**

![Battery Status Change on Analysis Portlet](https://mintcdn.com/germain-ux/ZJflvRMC808oZDAs/images/main/battery-level-monitoring/image-20230327-085559.png?fit=max\&auto=format\&n=ZJflvRMC808oZDAs\&q=85\&s=fa9420adfd3e20e85200942b4eda64ac)

1. Connect or disconnect the charger.
2. Confirm that a charging-status-change event appears.

![RCA of a Battery Status Change](https://mintcdn.com/germain-ux/ZJflvRMC808oZDAs/images/main/battery-level-monitoring/image-20230327-085756.png?fit=max\&auto=format\&n=ZJflvRMC808oZDAs\&q=85\&s=f0d4cbc3e15e92e2259fcf11b5f04318)

1. Verify the application, session, browser, and battery properties.
2. Restore the intended production threshold.

## Troubleshooting

If battery events are not collected:

1. Confirm that the application uses [GermainUX RUM JS](/main/germain-ux-rum-js.md).
2. Verify that the browser supports and exposes the Battery Status API.
3. Test on a physical battery-powered device.
4. Confirm that battery monitoring is enabled in the UX Monitoring Profile.
5. Verify that the configured threshold is valid.
6. Check the browser console for initialization errors.
7. Confirm that the browser can send telemetry to GermainUX.
8. Review sampling, consent, and privacy settings.
9. Check whether browser or enterprise-security policies restrict battery access.

## Deployment and configuration

* Deploy [GermainUX RUM JS](/main/germain-ux-rum-js.md).
* Confirm that the monitored browsers expose battery information.
* Use the preconfigured 15% threshold or configure a customer-specific threshold.
* Validate low-battery and charging-status-change events on a physical device.
* Review privacy, access, and retention requirements.
* Analyze battery events using the available browser and user-session KPIs.
* Configure alerts, Watches, dashboards, or reports only when required.

## Get Help

> **[Contact GermainUX Support](/main/support.md)**
>
> The Germain Team can help you set this up.

> **Can't find what you need?**
>
> Search all GermainUX docs with **Ctrl + K**, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.