Getting Started
UI Platform LogRocket library standardizes the way we integrate LogRocket into our applications.
LogRocket is an observability tool that helps us to understand problems affecting our users. It records everything users do on our site, including network requests, JavaScript errors, and browser metadata. This allows us to reproduce issues and fix them faster.
It also provides product analytics, performance monitoring, and user feedback features, enabling us to improve the overall user experience.
Features
- Easy initialization of LogRocket with a simple function call.
- Consistent configuration across different applications.
- Truncation of network requests & response body to ensure data privacy.
- Redaction of sensitive information from user inputs elements.
- Redaction of sensitive http request headers and url query parameters.
- Removes sensitive aria attributes to prevent capturing of PII information.
- Integration with UI Platform ecosystem (App SDK, React Boilerplate, pui-diagnostics)
- Merging of session recording across multiple iframes.
- Support for react component names in session recordings.
- Support for both NodeJS and CDN installations.
- TypeScript definitions for better developer experience.
- Built-in error tracking and performance monitoring.
Installation
NodeJS
Install the library using pnpm:
pnpm add @elliemae/pui-logrocket
CDN
Include the library via a CDN (Recommended). Add the following script tag to your HTML:
<script src="https://cdn.mortgagetech.ice.com/pui-logrocket@1"></script>
UAT version:
<script src="https://cdn.mortgagetech.uat1.ice.com/pui-logrocket@1"></script>
Stage version:
<script src="https://cdn.mortgagetech.s1.ice.com/pui-logrocket@1"></script>
PEG version:
<script src="https://cdn.mortgagetech.pl1.ice.com/pui-logrocket@1"></script>
QA version:
<script src="https://cdn.mortgagetech.q1.ice.com/pui-logrocket@1"></script>
Usage
Once installed you can initialize LogRocket in your application:
with NodeJS install:
import { initLogRocket } from '@elliemae/pui-logrocket';
initLogRocket({ appId: 'logrocket-app-id' });
with CDN install:
window.emuiLogrocket.initLogRocket({ appId: 'logrocket-app-id' });
Replace logrocket-app-id with your actual LogRocket app ID.