Issues with Interactions created for SPA Browser Interaction


We are using BrowserIntraction to check the how well the page performed through out.
we have some scenario’s where new relic is recording the previousUrl and targetUrl incorrectly.
If we check the AjaxRequest table for those InteractionId which has incorrect mapping of previous and target url’s it shows api calls which was not supposed to be called in that screen.

Because of this the performance metrics have taken a hit, but ideally not sure what has happened.

This happens mostly during the category Initial page load. - and it has 10% occurrences.

Any help would be much appreciated!

Hi @abinavaraam.k ,

As I understand, you have installed the Browser agent, and the AjaxRequest events being captured during the BrowserInteraction event seem to be off, particularly with the previousURL and targetUrl attributes.

BrowserInteraction will record information about the session, AJAX calls, and custom JavaScript timing resulting from the interaction. Additionally, initial page load, route changes, and scheduled or dynamic updates to an app’s widget are captured as special types of Browser interactions. They all are used for SPA monitoring like the one you are using.
Also, all AjaxRequest events are created automatically when an Ajax request occurs during a BrowserInteraction event. If the request was not made during a BrowserInteraction - i.e., if it was made after a route change was completed - it will not generate an AjaxRequest event.

With that in mind, the API calls you are seeing are likely to be recorded as they are part of a given initial page load or route change event. Have you noticed this behavior in a specific time frame? Can you provide a link to your app and a permalink? Are there any specific routing frameworks you are using?

Thanks in advance for providing more information.


Hi @fquiros,

We are using Angular framework for UI.
let’s say we have a landing page where user can land from other apps This is the initial screen where the whole of the angular app is initialized . this can be on refresh or on redirects from other apps to our apps.

So what new relic is capturing should be only with in the scope of that browser interaction(meaning when the route starts and route ends or for the initial page loads)
n here the Ajax request should be only capturing the api’s called during this particular interactions right?

what we see for few interactions are something where an api’s which was not even called in the screen was recorded in the browser interaction.

is it possible to know how new relic is ending the interactions ?
would there be possibility that interactions are clubbed together on these cases?

these happens only during initial page load and not on route change or click events,
not sure how do i share the metrics to u ? create a dashboard and share ?

Hi @abinavaraam.k,

Thanks for elaborating more on this issue.
To investigate further why that happens only during initial loads and why the interactions are being grouped, I would need to look at your app. Please share the URL (in case the mentioned landing page is public) and a permalink to your New Relic’s Browser app reflecting this issue. If you want to create a dashboard and shared a permalink as well, that would be great.

I really appreciate the info you can provide.