# Track frontend application UI events? Better way?

**URL:** <https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 24, 2021, 4:37am UTC](https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861 "2021-12-24T04:37:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagendrahk](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nagendrahk](https://discuss.elastic.co/u/nagendrahk)\
**Post date:** [December 24, 2021, 4:37am UTC](https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861/1 "2021-12-24T04:37:55Z")

</div>

I want to build ELK application to track frontend events from my react application. I having two approaches in mind

1. Store events in log file using winston package and later push it to logstash and elastic with filebeats
2. Directly send the incoming events data to logstash with UDP protocol and later to elastic.

I want to understand which one is the better way to solve this problem. I am little concerned since beats use IO operations to read data, this might affect my server performance.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [December 24, 2021, 4:54am UTC](https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861/2 "2021-12-24T04:54:36Z")

</div>

Have you perhaps considered the Real User Monitoring (RUM) agent?

> **[Introduction | APM Real User Monitoring JavaScript Agent Reference \[5.x\] |...](https://www.elastic.co/guide/en/apm/agent/rum-js/current/intro.html)**

---

<div class="post-metadata">

**Author:** ![nagendrahk](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nagendrahk](https://discuss.elastic.co/u/nagendrahk)\
**Post date:** [December 24, 2021, 4:58am UTC](https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861/3 "2021-12-24T04:58:05Z")

</div>

> [@stephenb](#):
>
> Real User Monitoring (RUM)

Thanks @stephenb for your response. RUM looks fine. But considering the above options which you think will be better in terms of performance ?

---

<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:** [January 21, 2022, 6:58am UTC](https://discuss.elastic.co/t/track-frontend-application-ui-events-better-way/292861/4 "2022-01-21T06:58:06Z")

</div>

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