> ## 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.

# Configure Monitoring for JavaScript

> How to configure GermainUX JavaScript monitoring for web applications, including real user monitoring and session replay settings.

Components
[`Engine`](https://docs.germainux.com/main/germain-ux-engine)
[`JS Profiler`](https://docs.germainux.com/main/germain-ux-js-profiler)
[`Mobile`](https://docs.germainux.com/main/germain-ux-mobile-app)
[`RPA Bot Recorder`](https://docs.germainux.com/main/germain-ux-rpa-bot-recorder)
[`RUM JS`](https://docs.germainux.com/main/germain-ux-rum-js)
[`RUM Extension`](https://docs.germainux.com/main/germain-ux-rum-extension)

Availability
2017.1 or later

> [card] [Standard JavaScript Monitoring Enabling](#standard-javascript-monitoring-enabling)
>
> Turn on basic JS monitoring

> [card] [Deep JavaScript Monitoring Enabling](#deep-javascript-monitoring-enabling)
>
> Turn on profiling depth

> [card] [Deep JavaScript Monitoring Disabling](#deep-javascript-monitoring-disabling)
>
> Turn profiling back off

> [card] [Advanced Configuration](#advanced-configuration)
>
> Fine-tune profiling settings

## Steps on how to configure monitoring for JavaScript.

## Standard JavaScript Monitoring Enabling

[Details on how to enable](https://docs.germainux.com/main/user-monitoring-and-replay-configuration.md) Javascript monitoring.

## Deep JavaScript Monitoring Enabling

### Chrome Extension (No banner)

This option avoids the Debugging banner from appearing on the end-user’s browser while JavaScript Execution Time/profiling is being collected in the background. Have the End-Users launch Chrome with an additional flag

| Step | Details |
| - | - |
| 1 | Go to **Germain Workspace > Left Menu > Analytics > UX Monitoring Profiles** |
| 2 | Select UX Monitoring Profile to update |
| 3 | Select **JavaScript Profiling Monitoring** in the Configuration Editor |
| 4 | Locate the shortcut file used to launch Chrome: search for the shortcut in the Start Menu, right-click the shortcut, choose "Open file location" |
| 5 | Edit the properties of the Chrome shortcut [file: righ](#)t click, properties |
| 6 | Add `--silent-debugger-extension-api` to the end of the target value, leaving a space between |
| 7 | Ensure that this modified shortcut is what is used when running Chrome to open the web page being monitored |

### Chrome Extension (Banner on end-user browser)

| Step | Details |
| - | - |
| 1 | Go to **Germain Workspace > Left Menu >** **Analytics > UX Monitoring Profiles** |
| 2 | Select UX Monitoring Profile to update |
| 3 | Select **JavaScript Profiling Monitoring** in the Configuration Editor |

As a security feature, Chrome will display a banner along the top of the browser window when a monitored page is open. It looks like the following:

![Configure Monitoring for JavaScript: Chrome Extension (Banner on end-user browser)](https://mintcdn.com/germain-ux/ZJflvRMC808oZDAs/images/main/configure-monitoring-for-javascript/image2019-7-22_18-25-17.png?fit=max\&auto=format\&n=ZJflvRMC808oZDAs\&q=85\&s=edb1a3314c9d75b3a6d3222fe5a953bb)

If the user clicks either the Cancel or X buttons, the JS profiler details will cease to be collected until the page is opened in a new tab and the banner re-appears.

### Custom Response Header

| Step | Details |
| - | - |
| 1 | Go to **Germain Workspace > Left Menu >** **Analytics > UX Monitoring Profiles** |
| 2 | Select UX Monitoring Profile to update |
| 3 | Select **JavaScript Profiling Monitoring** in the Configuration Editor |
| 4 | Add `Document-Policy: js-profiling` response header to each page for which you want to collect JavaScript Time Execution / Profiling details |

## Deep JavaScript Monitoring Disabling

| Step | Details |
| - | - |
| 1 | Go to **Germain Workspace > Left Menu >** **Analytics > UX Monitoring Profiles** |
| 2 | Select UX Monitoring Profile to update |
| 3 | Unselect **JavaScript Profiling Monitoring** in the Configuration Editor |

## Advanced Configuration

All the settings available on the `settings.plugins.jsProfiling` object are listed below. Please [contact us](https://docs.germainux.com/main/support.md) If you need any help with this advanced configuration.

```typescript theme={null}
/** Minimum function/stack hits to end up in the result output. Default: 0. */
functionMinStackHits: number;
/** Maximum sample capacity for JavaScript Self-Profiling API only (in samples). Default: 1000. */
maxSampleBufferSize: number;
/** Maximum profiling duration (in seconds). Default: 30. */
maxProfileDuration: number;
/** Start profiler on first page ready event if true. Otherwise it will start from the next page load. Default: true. */
profileOnPageReady: boolean;
/** Target sample interval (in millis per sample). Default: 20. */
sampleIntervalMillis: Millis;
/** Check for JavaScript Self-Profiling API and before checking for JS Profiler extension. This avoids "Document policy violation: js-profiling is not allowed in this document." error message if API not allowed but we check for it. Default: false. */
useSelfProfilingAPI: boolean;
/** Run profiler for all except these usernames. Undefined or empty array means run for everyone. Default: undefined. */
excludedUsernames?: string[];
/** Run profiler only for these usernames. Undefined or empty array means run for everyone. Default: undefined. */
includedUsernames?: string[];
```

## Get Help

> [card] [Contact GermainUX Support](https://docs.germainux.com/main/support.md)
>
> 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.

> [card] 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.