• EnglishEspañol日本語한국어Português
  • Log inStart now



newrelic.setApplicationVersion(value: string|null)

Adds a user-defined application version string to subsequent events on the page.



Upon executing this function with a valid value, the browser agent appends an application.version attribute to all subsequent events until the attribute is manually unset or the page is unloaded. If the function is called more than once, only the most recent value provided will be sent on subsequent events. If this function is called with a value of null, any existing application version will cease to send on subsequent events.

Setting the application.version attribute will help you identify which versions of your software are producing the errors. An upcoming release of errors inbox will automatically track which versions of your software are producing errors. If you are using SPA monitoring with a compatible agent version, application version will also be included in newrelic.interaction events.





string OR null

Required. A string representing the web application's version, useful for tying all browser events to specific release tags. The value parameter does not have to be unique. If IDs should be unique, the caller is responsible for that validation.

Passing a null value unsets any existing application version.


Decorating events with an application version

newrelic.setApplicationVersion('1.2.3') // decorates events with the property 'application.version':'1.2.3'

Stopping events from decorating application version

newrelic.setApplicationVersion(null) // events will no longer have an 'application.version' property set
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.