# RUM agent - using Beacon API

**URL:** <https://discuss.elastic.co/t/rum-agent-using-beacon-api/170213>\
**Category:** APM\
**Created:** [February 27, 2019, 5:37pm UTC](https://discuss.elastic.co/t/rum-agent-using-beacon-api/170213 "2019-02-27T17:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WilliamHayes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/williamhayes/32/41374_2.png) [@WilliamHayes](https://discuss.elastic.co/u/WilliamHayes)\
**Post date:** [February 27, 2019, 5:37pm UTC](https://discuss.elastic.co/t/rum-agent-using-beacon-api/170213/1 "2019-02-27T17:37:55Z")

</div>

Curious if there are any plans to use the Beacon API for the RUM agent? [https://developer.mozilla.org/en-US/docs/Web/API/Beacon\_API](https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API) It seems like it would greatly increase performance for monitoring.

---

<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:** [February 28, 2019, 8:49am UTC](https://discuss.elastic.co/t/rum-agent-using-beacon-api/170213/2 "2019-02-28T08:49:39Z")

</div>

Hi William,

Thanks for your interest in Elastic APM.

The Beacon API is generally used to send analytics data before the page unload to avoid blocking the unload event. Currently we don't block the unload event since we have earlier opportunities to send the payload to the APM server.

However, I've created [this issue](https://github.com/elastic/apm-agent-js-base/issues/195) to consider using the Beacon API to capture any payload we might have during unload event.

Cheers,  
Hamid

---

<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:** [March 21, 2019, 4:49am UTC](https://discuss.elastic.co/t/rum-agent-using-beacon-api/170213/3 "2019-03-21T04:49:40Z")

</div>

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