New Relic is an observability platform that helps you build better software integrated into Nexplayer SDK for Tizen, WebOS, Xbox, and PlayStation 5.
First of all, if you don't have a New Relic account, sign up. If you don't have an agent.js file you can follow this New Relic documentation to create it.
In order to use it, you need to import these files into the HTML.
<head>
<!-- New Relic browser agent. REMEMBER TO REPLACE THIS SCRIPT WITH YOUR OWN BROWSER AGENT -->
<script type="text/javascript" src="./agent.js"></script>
<!-- New Relic tracker -->
<script src="https://nexplayer.nexplayersdk.com/NewRelic/newrelic-video-nexplayer.min.js"></script>
<!-- Nexplayer library -->
<script src="https://nexplayer.nexplayersdk.com/HTML5/3.3.10_20210614/nexplayer.js"></script>
</head>
Additionally, you should pass in the Setup the useNewRelicTracker property on true.
nexplayer.Setup({
key: 'YOUR KEY',
src: 'VIDEO URL',
div: document.getElementById('player'),
debug: true,
autoplay: true,
mutedAtStart: true,
useNewRelicTracker: true, // Set this property to true in order to use the NR tracker.
...
});