I am struggling with where to put the RUM javascript and import statements to get them to work with our application. I have the following javascript from datadog import { datadogRum } from '@datadog/browser-rum'; datadogRum.init({ applicationId: 'xxxxx', clientToken: 'xxxxx', // `site` refers to the Datadog site parameter of your organization // see https://docs.datadoghq.com/getting_started/site/ site: 'xxxx', service: 'xxxxx', env: 'perf', // Specify a version number to identify the deployed version of your application in Datadog // version: '1.0.0', sessionSampleRate: 20, sessionReplaySampleRate: 20, defaultPrivacyLevel: 'mask',}); I have used NPM to add DataDataDog RUM to the the package.json file but I cannot find anwhere to add the actual javascript to that either doesn't throw an error or is not ignored completely.
asked
Jesse Lyons
1 answers
0
This blog post shows what to do - you should be able to do everything with custom variables and such without having to dive into your files manually: