At New Relic, our customers depend on us to ensure their business-critical websites operate smoothly and perform well. Our browser monitoring solution provides full visibility into the entire user experience, allowing customers to prioritize frontend performance and quickly debug and resolve issues that impact users. This deep visibility helps customers achieve faster load times, smoother interactions, and higher conversion rates. These capabilities are supported by the New Relic browser agent, which has been designed to help you make sure your website is running as expected, and to do that without the need for collecting and saving any sensitive data about identifiable individuals. This allows you to take advantage of website monitoring in a world where the need for user privacy and privacy compliance runs high.

New Relic’s new browser consent mode is a way for compliance-savvy customers to customize the New Relic browser agent deployment to collect and store identifiable data and continue to maintain the necessary compliance posture. Consent mode is a browser monitoring configuration option that allows users of a website to either start or stop sending telemetry data about their session over the network. This feature allows for the integration of privacy policy opt-ins, modals, or other common plugins to give users control over whether and how web applications collect, transmit and process data monitored by the browser agent. With privacy in mind, consent mode provides you the option to pass your website visitors’ preferences for sending performance data related to their session to New Relic, adding flexibility for your business needs in an ever-changing regulatory landscape. For those customers who need to add a consent mechanism in order to comply with local regulations, this allows you to meet those requirements.

Our goal is to provide the tools and configuration options you need for your business needs. And in this post, we’ll share how your front-end engineers can use this feature.  

Step 1: Enable consent mode in app settings

Visit your browser application’s app settings page and enable “Turn on consent.” Alternatively, you can use NerdGraph to enable this setting on. To do so, run a mutation query on the browserSettings object for the browser_consent_mode property. See an example query below.  

Step 2: Add your opt-in mechanism 

There are a variety of plugins, modals, and components specific to any given framework or UX presentation that you can select and use to present the choice to your users. For example, a website consent banner tool may present user preferences and save user preferences. After that is integrated with your application, you then call the new browser API, consent(), and pass it the argument.

For example, if you are using your plugins, modals, components, or UX presentations and asking your users to consent to sending their session’s telemetry data over the network, and a user clicks a button, “Yes, I consent,” (which you set up), you would then need to call the consent() API to send that response. The accept parameter is ‘true’ by default. 

Browser features with autoStart: true will send data to New Relic after consent is provided. Our harvest intervals for data can be referenced here.  Browser features with autoStart:false will need to be invoked using the start() API to start deferred agent features to send data. 

If you set up an option and your user clicks a “No, I do not consent” button, you will need to call consent(false). This means the browser agent will not send  browser telemetry data over the network.

New Relic Advance Build smarter automations with Intelligent Observability
Save your seat.