Skip to main content

Prerequisites

Confirm germainapm.js loads

Salesforce security considerations

Lightning isolation limits explained

Monitoring Control API

Programmatically control monitoring

Custom Data API

Log custom Salesforce activity
APIs for Salesforce Classic and Lightning GermainUX provides JavaScript APIs for extending Salesforce Real User Monitoring and Session Replay. These APIs allow developers to control monitoring programmatically and capture Salesforce-specific events, metrics, transactions, and diagnostic logs. The APIs are provided by GermainUX RUM JS and become available through the global germainApm object after monitoring has initialized.

Available APIs

Prerequisites

Before using these APIs:
  1. Deploy and configure Salesforce user monitoring.
  2. Verify that germainapm.js loads and initializes successfully.
  3. Confirm that germainApm is available in the JavaScript execution context where the API will be called.
  4. Define any required GermainUX KPIs, business processes, rules, SLAs, or data-privacy settings.
  5. Test the implementation in a Salesforce sandbox before deploying it to production.
See:

Salesforce security considerations

Salesforce Lightning uses security isolation mechanisms that restrict JavaScript access across components and page contexts. Code running inside a custom Aura or Lightning Web Component might not be able to access a germainApm instance loaded in the root Salesforce page. Likewise, component-level instrumentation does not automatically provide access to every action occurring elsewhere in the Salesforce interface. For comprehensive monitoring of Salesforce Classic and Lightning—including standard Salesforce pages and components—deploy the GermainUX RUM Browser Extension as described in the Salesforce deployment guide. Disabling Salesforce security controls solely to obtain broader JavaScript access is not recommended.

Monitoring Control API

The Monitoring Control API supports the following operations: Monitoring normally starts automatically after germainapm.js has loaded and initialized. Programmatic control is primarily useful for consent workflows, authentication events, selective monitoring, and troubleshooting.

Custom Data API

Use the Custom Data API to capture Salesforce activity that GermainUX does not collect automatically or that is specific to a customized implementation.

Example use cases

The APIs can be used to capture:
  • Custom Lightning component actions
  • Salesforce Flow milestones
  • Opportunity, Case, and approval-process steps
  • User validations and user-facing errors
  • Custom search results
  • Integration request durations
  • Record-processing volumes
  • Caught JavaScript exceptions
  • Application-specific diagnostic details
Do not include passwords, authentication tokens, session identifiers, protected health information, payment information, or other sensitive data in custom API payloads. Apply GermainUX masking, anonymization, and exclusion rules before production deployment.

API reference

For complete method signatures, parameters, default values, examples, and behavior, see APIs for User Monitoring and Replay. That reference covers:
  • Starting monitoring
  • Stopping monitoring
  • Uninstalling monitoring
  • Creating custom events
  • Creating custom metrics
  • Creating transactions with known or measured durations
  • Creating diagnostic logs
  • Logging caught exceptions
  • Creating trace logs

Validation

After implementing a Salesforce API call:
  1. Perform the instrumented action in Salesforce.
  2. Confirm that the expected data reaches GermainUX.
  3. Verify that it is associated with the correct user session, application, page, and Salesforce organization.
  4. Confirm that the data appears under the intended KPI.
  5. Review payloads for sensitive or unnecessary data.
  6. Test the behavior across Lightning, Classic, console applications, and multiple browser tabs when applicable.

Get Help

Contact GermainUX Support

The GermainUX team helps you get up and running faster, empower your team, turn data into actionable insights, and optimize performance to deliver measurable business outcomes.

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.