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

# Deploy RUM JS (Google Tag Manager)

> Deploy GermainUX RUM JavaScript through Google Tag Manager (GTM) to monitor real-user performance without changing the application source code.

Components
[`RUM JS`](https://docs.germainux.com/main/germain-ux-rum-js)

> [card] [Configure Application](#1-configure-the-application-in-germainux)
>
> Register app and profile

> [card] [Configure Trigger](#4-configure-the-trigger)
>
> Choose the page trigger

> [card] [Preview and test the tag](#preview-and-test-the-tag)
>
> Check firing with Tag Assistant

> [card] [Troubleshooting](#troubleshooting)
>
> Fix common tag issues

**Deploy GermainUX RUM JavaScript with Google Tag Manager**

Deploy GermainUX RUM JavaScript through Google Tag Manager (GTM) to monitor the performance and experience of real users without changing the application’s source code directly.

Once deployed, GermainUX can capture performance, errors, user interactions, journeys, and session-replay data according to the selected UX monitoring profile.

## Before you begin

You need:

| Requirement | Details |
| - | - |
| GermainUX version | GermainUX 2022.5 or later |
| Access | Access to Germain Workspace |
| Permissions | Permission to create or update UX monitoring profiles |
| GTM access | Edit and publish access to the appropriate GTM container |
| Application info | The URL of the application to monitor |
| Test environment | A test or preview environment for validation |
| Privacy | An approved privacy and consent configuration |

Confirm that browsers can send HTTPS traffic from the monitored application to the GermainUX environment.

## Deployment overview

The deployment consists of four stages:

**1. Create the application and UX monitoring profile in GermainUX**

**2. Retrieve the installation script generated by GermainUX**

**3. add the script to a GTM Custom HTML tag**

**4. Preview, validate, and publish the GTM container**

## 1. Configure the application in GermainUX

1. Sign in to Germain Workspace.
2. Go to **Wizards**.

   ![Deploy RUM JS (Google Tag Manager): 1. Configure the application in GermainUX](https://mintcdn.com/germain-ux/hPK2RwO7wyn44bNw/images/main/deploy-rum-js-google-tag-manager/image-20260827-034316.png?fit=max\&auto=format\&n=hPK2RwO7wyn44bNw\&q=85\&s=4476f7d6c41b1d094630271380440a0d)
3. Open **Google Tag Manager**.
4. Enter the application name.
5. Enter the application URL.

   ![Deploy RUM JS (Google Tag Manager): 1. Configure the application in GermainUX, image 2](https://mintcdn.com/germain-ux/hPK2RwO7wyn44bNw/images/main/deploy-rum-js-google-tag-manager/2.png?fit=max\&auto=format\&n=hPK2RwO7wyn44bNw\&q=85\&s=e991c3aa5942af80f22a8988059b403b)
6. Select or create the appropriate UX monitoring profile.
7. Configure the requested application and environment information.
8. Complete the wizard.

Use a name that identifies both the application and environment, such as:

| Example name | Format |
| - | - |
| `Customer Portal – Production` | Application – Environment |
| `eCommerce Website – QA` | Application – Environment |
| `Employee Portal – Production` | Application – Environment |

Use separate configurations when QA and production send telemetry to different GermainUX environments or require different privacy settings.

## 2. Retrieve the installation script

The wizard displays the deployment instructions after creating the configuration.

You can return to these instructions at any time:

1. Go to **Analytics > UX Monitoring Profiles**.
2. Select the profile assigned to the monitored application.

   ![Deploy RUM JS (Google Tag Manager): 2. Retrieve the installation script](https://mintcdn.com/germain-ux/hPK2RwO7wyn44bNw/images/main/deploy-rum-js-google-tag-manager/4.png?fit=max\&auto=format\&n=hPK2RwO7wyn44bNw\&q=85\&s=419b9249a4983d1292f440d6c495eaa2)
3. Open the profile in the Configuration Editor.
4. Select **Installation**.
5. Locate the Google Tag Manager deployment instructions.
6. Copy the complete script generated for the application.

Use the script provided by your GermainUX environment. Do not manually reconstruct URLs, identifiers, or configuration values from another application or environment.

## 3. Create the GTM tag

In Google Tag Manager:

**1. Open the container used by the monitored application**

**2. Go to Tags**

**3. Select New**

**4. Enter a descriptive name, such as `GermainUX RUM – Production`**

**5. Select Tag Configuration**

**6. Choose Custom HTML**

**7. Paste the complete GermainUX installation script into the HTML field**

**8. Configure the appropriate trigger**

**9. Save the tag**

## 4. Configure the trigger

For complete application monitoring, use an initialization or page-view trigger that runs on every monitored page.

Choose the trigger according to your application:

| Application type | Recommended approach |
| - | - |
| Traditional multi-page website | Load the tag on all applicable page views. |
| Single-page application | Load RUM JavaScript once during application initialization. |
| Selected application area | Restrict the trigger to the required paths or hostnames. |
| Multiple environments in one container | Use hostname or environment conditions to load the correct configuration. |
| Consent-controlled website | Load the tag only after the required consent state is available. |

Do not configure the tag to run repeatedly for every virtual route change unless the GermainUX deployment instructions explicitly require it. Initializing RUM JavaScript more than once can create duplicate sessions, events, or requests.

## Consent configuration

If the application uses a consent-management platform, align the GTM trigger with the organization’s approved consent policy.

Depending on your legal basis and configuration, you may need to:

| Action | Details |
| - | - |
| Prevent loading | Prevent the tag from loading before consent. |
| GTM Consent Mode | Use GTM Consent Mode or a consent-specific trigger. |
| Session replay | Disable session replay until the required consent is available. |
| Essential monitoring | Enable only essential monitoring before consent. |
| Regional rules | Apply different rules by country or region. |
| Withdrawal | Respect withdrawal of consent. |

Technical deployment through GTM does not replace the organization’s responsibility to provide appropriate notices and obtain consent where required.

## Privacy configuration

Before publishing the tag, configure and test the UX monitoring profile to ensure that sensitive information is not captured.

Review:

* Input-field masking
* Page and element exclusions
* Session-replay settings
* User-identifier handling
* URL and query-parameter capture
* Request and response data

> [accordion] Show all 10
>
> * Custom attributes
> * Text-content collection
> * Data retention
> * Sampling

Do not collect passwords, authentication tokens, payment information, health information, or other restricted data.

Whenever possible, exclude sensitive information before it leaves the user’s browser.

## Content Security Policy

An application using Content Security Policy may block the Custom HTML tag, the GermainUX script, or its outbound connections.

Review the browser console for violations involving:

* `script-src`
* `connect-src`
* `img-src`
* `style-src`
* `worker-src`

Allow only the specific GermainUX origins required by your deployment. Coordinate policy changes with the application-security team and avoid broad wildcard permissions.

If your policy does not permit inline scripts, the standard GTM Custom HTML approach may require an approved nonce, hash, or alternative deployment method.

## Preview and test the tag

Do not publish the container immediately.

1. Select **Preview** in Google Tag Manager.

   ![Deploy RUM JS (Google Tag Manager): Preview and test the tag](https://mintcdn.com/germain-ux/hPK2RwO7wyn44bNw/images/main/deploy-rum-js-google-tag-manager/3.png?fit=max\&auto=format\&n=hPK2RwO7wyn44bNw\&q=85\&s=cda81b7ba968d5f6fda554364a377fd0)
2. Enter the application URL.
3. Connect Tag Assistant to the application.
4. Confirm that the GermainUX tag fires on the intended pages.
5. Confirm that it does not fire on excluded pages.
6. Open the browser developer tools.
7. Check the console for JavaScript, CSP, certificate, or network errors.
8. Confirm that the GermainUX script loads successfully.
9. Perform several representative user actions.
10. Confirm that telemetry is sent to the expected GermainUX environment.

If consent is required, test both consent states:

* The tag does not load before the required consent.
* The tag loads after consent is granted.
* The appropriate behavior occurs after consent is withdrawn.

## Validate the data in GermainUX

After completing the browser test:

**1. Open Germain Workspace**

**2. Search for the monitored application**

**3. Locate the test session**

**4. Confirm that page views and navigation were captured**

**5. Review performance measures and user interactions**

**6. Confirm that JavaScript and network errors are reported**

**7. Open the session replay, if enabled**

**8. Verify that sensitive fields and elements are masked or excluded**

**9. Confirm that the application and environment names are correct**

**10. Check that only one session and one set of events were generated**

Repeat the validation using every browser and application workflow that is important to the deployment.

## Publish the GTM container

After validation:

**1. Return to Google Tag Manager**

**2. Select Submit**

**3. Enter a version name, such as `Add GermainUX RUM monitoring`**

**4. Describe the application, environment, trigger, and UX profile included in the change**

**5. Review all container changes**

**6. Select Publish**

For high-traffic applications, consider limiting the initial production deployment to a small percentage of users or a controlled audience before enabling it for everyone.

## Verify the production deployment

After publishing:

| Verification step | Expectation |
| - | - |
| Open app | Open the production application in a new browser session. |
| Tag firing | Confirm that the published tag fires. |
| Requests | Verify that requests go to the production GermainUX environment. |
| Sessions | Check that production sessions appear in GermainUX. |
| Masking | Validate masking and exclusion rules again. |
| Monitoring | Monitor data volume and browser performance. |
| Duplicates | Confirm that sessions are not duplicated. |
| Dashboards | Verify that dashboards, SLAs, and alerts use the expected application data. |

## Updating the deployment

When the GermainUX installation script or destination changes:

**1. Retrieve the current script from the UX monitoring profile**

**2. Create a new GTM container version**

**3. Update the Custom HTML tag**

**4. Test the change using GTM Preview**

**5. Validate incoming data in GermainUX**

**6. Publish the updated container**

**7. Retain the previous GTM version for rollback**

Configuration changes made entirely within the centrally managed UX monitoring profile may not require a new GTM deployment.

## Troubleshooting

### The GermainUX tag does not fire

Check that:

* The tag is included in the current container version.
* The trigger matches the current URL, hostname, and consent state.
* Trigger exceptions are not preventing execution.
* The correct GTM container is installed on the application.
* The latest container version has been published.
* Browser privacy tools are not blocking GTM.

Use GTM Preview to determine why the tag did not fire.

### The tag fires, but no data appears

Confirm that:

* The complete GermainUX script was copied.
* The script points to the correct GermainUX environment.
* The application and UX monitoring profile are enabled.
* Content Security Policy permits the script and outbound connections.
* Proxy and firewall rules allow access to GermainUX.
* Browser privacy tools are not blocking the request.
* The current URL falls within the monitored application’s scope.

### Data is duplicated

Check whether:

* The RUM script is also embedded directly in the application.
* More than one GTM container loads it.
* Multiple GermainUX tags use overlapping triggers.
* The same tag fires on initialization and every route change.
* The application initializes GTM more than once.

A page should normally initialize the applicable GermainUX RUM configuration only once.

### Some routes are missing

For a single-page application, confirm that the selected GermainUX integration detects client-side route changes. Also verify that GTM is not reinitializing the complete RUM script for every virtual navigation.

### Session replay contains sensitive information

Disable or restrict the affected monitoring profile immediately. Correct the masking or exclusion rules, validate them in a non-production environment, and only then re-enable the affected capture.

## Feature information

| Property | Value |
| - | - |
| Component | RUM JavaScript |
| Deployment method | Google Tag Manager |
| Feature availability | GermainUX 2022.5 or later |
| GTM tag type | Custom HTML |
| Recommended rollout | Preview, pilot, and staged production deployment |

> [!NOTE]
>
> Feature available in Germain v2022.5 or later

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