RUM agent for angular application not capturing page clicks events

Hi We are trying out RUM agent for our angular web application Angular 10 applicaiton
configured by adding script tag in the index.html of our SPA.

We are checking the metrics being recorded and noticed that total page views does not change /updates as we keep on navigating the across application tabs and menus. The page views count updates only when we reload the complete application , i.e initial login is recoreded but not subsequent clicks .

<script src="assets/elastic-apm-rum.umd.min.js" crossorigin></script>
    <script>
      elasticApm.init({
        serviceName: 'UI_LIVE',
        serverUrl: 'http://144.10.238.30:61001',
        active: true,
        instrument: true
      })
    </script>

what i am missing here , please help!.

Hi @pathfinder225,

It could be that the subsequent clicks does have any interesting events which would skip the agent from reporting those non interesting events to the APM server.

Could you enable the logLevel: debug - Configuration | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic in the configuration and check the browser logs to confirm if this is the case.

Thanks,
Vignesh

@vigneshshanmugam thank you for response.
will enable this and post my observations here.

we could see some events being sent tp apm server during user clicks or navigation on UI and some transactions getting logged at APM but on user experience no changes.

Thanks for the details, Should have been more clear the first time.

  1. Page views refers to Hard Navigations or Hard reloads only and does not increment for any other type of transactions like SPA navigations or user click events. User Experience page accounts only for page-load transactions.

  2. If your page views is not even increasing even with huge number of page-load transactions then it could be due to the less number of impressions/page views that the aggregation considers them to be too low. Trying to change the percentile or time range should change that. Let us know if that solves the issue.

Thanks,
Vignesh

@vigneshshanmugam

I was expecting it will capture all the route navigations or clicks that has network activity as total page views, which as per documentation below.

Are you saying for SPA it wont work that way.

If we are not capturing in user exprience , how can we measure internal page navigattion/clicks loadtimes in SPA.

[Supported Technologies | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic](https://User Experience)

Bit of history here, RUM was part of APM and you can still find all those different transaction types like page load, route-change and User interaction in the APM UI where you can analyze transaction duration which is eventually the load time duration of different transactions.

We are building the User Experience App specifically for RUM use case and kind of in the transition phase and currently only focussed on hard reloads as Core web vitals and other metrics would be applicable to those hard navigations and not for SPA and other transaction types. We are working on the next iteration which would bring in additional capability like exploring the data for different transactions and analysing the performance distribution.

I hope this is helpful. Let me know if you still have any questions.

Thanks,
Vignesh

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.