Component support
Supported browser components list
Custom Data API
Add app-specific telemetry
Create a trace log
Emit trace logs sparingly
Deployment and configuration
Deploy and configure APIs
Overview
GermainUX provides JavaScript APIs that allow developers to control browser monitoring and create application-specific events, metrics, transactions, and diagnostic logs. Most browser monitoring is automatic and does not require API calls. Use these APIs when the application needs to control monitoring programmatically or send business and technical data that GermainUX cannot detect automatically.Component support
API categories
Common use cases
Use the Browser Monitoring APIs to:- Start or stop monitoring based on consent.
- Clear monitoring state when a user signs out.
- Record an application-specific event such as
Payment Failed. - Record a numeric measurement such as the number of search results.
- Measure the duration of a business operation.
- Add technical context for an error handled by the application.
- Create custom browser KPIs for application-specific behavior.
- Correlate business milestones with user sessions and technical evidence.
Monitoring Control API
Start monitoring
Browser monitoring normally starts automatically aftergermainapm.js is downloaded and initialized. Calling start() is unnecessary during a standard deployment.
Use it when monitoring was previously stopped or when the application must start monitoring programmatically:
Example:
Stop monitoring
Usestop() to remove the active monitoring instrumentation:
Example:
stop():
- Stops monitoring immediately.
- Removes the active monitoring instrumentation.
- Does not flush data still waiting in the browser.
- Does not remove the
germainApmcode from the page. - Does not necessarily clear the stored monitoring state.
- Allows monitoring to start again after a full page load, hard navigation, or browser refresh.
uninstall() instead when pending data must be flushed or the stored monitoring state must be cleared.
Uninstall monitoring
Useuninstall() to stop monitoring, flush data available in the browser cache, and optionally remove the stored monitoring state:
A custom logout handler should use:
Multi-tab behavior
The optionalonAllTabs parameter uses the browser’s BroadcastChannel capability.
When supported:
start(..., true)can start monitoring across open tabs.stop(true)can stop monitoring across monitored tabs.uninstall(..., true)can uninstall monitoring across monitored tabs.
BroadcastChannel, the operation cannot be propagated to other tabs through this mechanism.
Custom Data API
The Custom Data API captures application-specific information that GermainUX does not collect automatically.Create a custom event
UsecreateEvent() to record a discrete application or business event:
Example:
Payment FailedCheckout CompletedSearch Returned No ResultsUser Changed SubscriptionDocument Uploaded
Create a custom metric
UsecreateMetric() to record a numeric measurement:
Example:
- Number of search results.
- Cart value.
- Number of records displayed.
- Queue depth shown to a user.
- Number of validation failures.
Create a transaction with a known duration
UsecreateTransaction() when the duration has already been calculated:
Example:
Measure a transaction between start and end
UsestartTransaction() and endTransaction() when GermainUX should calculate the duration.
Start the transaction:
- Authentication.
- Search.
- Quote generation.
- Document upload.
- Checkout.
- Report generation.
- Record creation.
- Application-specific workflow steps.
Create a diagnostic log
UsegermainApm.log() to add a custom internal monitoring log:
Example:
MonitoringSettings.constants.logLevelMonitoringSettings.constants.logLevelToEmitAsFacts
Log a handled exception
An exception handled by the application may not be visible to automatic unhandled-error monitoring. Use a custom log when the failure requires diagnostic visibility:Create a trace log
From custom data to analytics
Custom events, metrics, and transactions become available for GermainUX analysis:
These data points can be analyzed using measures, pivots, trends, drill-through, user-session context, and applicable custom insights.
A Custom Replay Insight can expose a selected event—such as Payment Failed or Checkout Completed—on the Session Replay timeline whenever it occurs in a user session.
A Watch can notify GermainUX users when an existing event, metric, transaction, or other insight meets conditions of interest. A Watch does not create the underlying insight.
Naming recommendations
Use names that are:- Stable across application releases.
- Specific enough to identify the business or technical condition.
- Consistent in capitalization and wording.
- Independent of dynamic values.
- Suitable for aggregation.
details object instead of the name.
Privacy and security
Custom API calls can send application data to GermainUX. Before adding custom details or logs:- Do not collect passwords, access tokens, authentication cookies, secrets, or payment credentials.
- Avoid collecting personal information unless it is required and approved.
- Prefer internal or pseudonymous identifiers.
- Mask, hash, or remove sensitive values.
- Keep detail objects small and relevant.
- Avoid sending complete application objects, responses, or DOM elements.
- Apply the organization’s access-control and retention requirements.
- Validate custom data in a non-production environment before deployment.
Error handling
Custom monitoring must not interfere with the monitored application. When integrating the API:- Confirm that
germainApmis available before calling it when monitoring may load asynchronously. - Do not block the user workflow while waiting for a monitoring call.
- Avoid changing application behavior if monitoring is unavailable.
- Keep custom processing lightweight.
- Test consent, logout, multi-tab, and page-navigation behavior.
Deployment and configuration
- Review Browser Monitoring.
- Review the Browser Monitoring Deployment Overview.
- Deploy GermainUX RUM JS to use the JavaScript APIs documented on this page.
- Deploy the GermainUX RUM Extension when direct RUM JS deployment is unavailable; validate API accessibility in the required application context.
- Deploy the GermainUX JS Profiler when deeper JavaScript and browser diagnostics are required.
- Review the available Browser Monitoring configuration.
Show all 10
Show all 10
- Review Metadata Extractors for application-specific user and session context.
- Review Custom Insights for custom KPIs and Session Replay timeline insights.
- Review the available KPIs for Browser Monitoring.
- Review the complete APIs for User Monitoring and Replay.
Get Help
Contact GermainUX Support
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 LLC.

