newrelic_get_browser_timing_footer([bool $include_tags])
Returns a New Relic Browser snippet to inject at the end of the HTML output.


Compatible with all agent versions.


Returns a JavaScript string to inject at the very end of the HTML output. Use this call with newrelic_get_browser_timing_header() to manually add New Relic Browser monitoring to a webpage. If possible, New Relic recommends instead enabling Browser via the New Relic UI or copy/pasting the JavaScript snippet. For instructions on using these options, see New Relic Browser and the PHP agent.

Compare newrelic_disable_autorum(), which disables the Browser script on a page.


Parameter Description



Optional. Defaults to true.

If true or omitted, the string is enclosed in a <script> element for easy inclusion in the page's HTML.

Return value(s)

Returns the New Relic Browser JavaScript footer string.


Instrument a webpage

function example(){
    if (extension_loaded('newrelic')) { // Ensure PHP agent is available
        $newrelic_header = newrelic_get_browser_timing_header();
    ... // Output to page
    if (extension_loaded('newrelic')) { // Ensure PHP agent is available
        $newrelic_footer = newrelic_get_browser_timing_footer();

For more help

Recommendations for learning more: