# RUM / JS APM display results for one page "Unknown"

**URL:** <https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311>\
**Category:** APM\
**Created:** [October 22, 2018, 1:23am UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311 "2018-10-22T01:23:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel\_k](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@ariel\_k](https://discuss.elastic.co/u/ariel_k)\
**Post date:** [October 22, 2018, 1:23am UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311/1 "2018-10-22T01:23:04Z")

</div>

Hello,  
i am trying to use APM with RUM / JS agent.  
i have installed it and i get data.  
the problem is that i get data on one page called unknown and the application has a few pages.  
it seems like the the APM agent get the page load transaction without the page name and all the XHR requests are not being reported.  
any idea on how to approach this issue ?

thanks,  
Ariel Kiel.

---

<div class="post-metadata">

**Author:** ![ariel\_k](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@ariel\_k](https://discuss.elastic.co/u/ariel_k)\
**Post date:** [October 29, 2018, 4:41pm UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311/2 "2018-10-29T16:41:56Z")

</div>

i guess this is the same issue i face:

> <https://github.com/elastic/apm-agent-js-base/issues/60>

---

<div class="post-metadata">

**Author:** ![Hamidreza](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamidreza/32/21369_2.png) [@Hamidreza](https://discuss.elastic.co/u/Hamidreza)\
**Post date:** [October 30, 2018, 8:24am UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311/3 "2018-10-30T08:24:24Z")

</div>

Hi Ariel,

Thanks for reaching out.  
By default the page load transactions are called unknown, this is mainly due to not having a good default for these kind of transactions (using the page url is not suitable for all use-cases, for example if it contains an ID).  
But there's a way to fix this. You can use our [`apm.setInitialPageLoadName(name)`](https://www.elastic.co/guide/en/apm/agent/js-base/current/api.html#set-initial-page-load-name) API to set the correct name.

By default XHRs that happen during an active transaction are captured, however, after the page load you need to start and end transactions manually in order to capture XHRs. You can find more information on [Custom Transaction guide](https://www.elastic.co/guide/en/apm/agent/js-base/current/custom-transactions.html).

As you mentioned one way to improve this would be to capture all XHRs automatically as a new transaction. Although this might be useful in certain use-cases, we need to be mindful of the amount of data generated by the agent. Please feel free to make a comment in that issue about your use-case.

Cheers,  
Hamid

---

<div class="post-metadata">

**Author:** ![ariel\_k](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@ariel\_k](https://discuss.elastic.co/u/ariel_k)\
**Post date:** [October 30, 2018, 3:58pm UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311/4 "2018-10-30T15:58:38Z")

</div>

Hi Hamid,  
thank you for your answer.  
since i am not the developer of this project my access to the source code is a bit limited , it would have been nice if there was an option to ad more power to the configuration so the source code of the project can be out of the loop. for example decide if we want to capture all XHR or some by white listing paths for example.  
and an options to add all the js code external and inject it with a tag.  
thanks again,  
Ariel.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 20, 2018, 11:58am UTC](https://discuss.elastic.co/t/rum-js-apm-display-results-for-one-page-unknown/153311/5 "2018-11-20T11:58:38Z")

</div>

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