# Is it possible to make the RUM agent use the id property, instead of the name property?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-make-the-rum-agent-use-the-id-property-instead-of-the-name-property/368622>\
**Category:** APM\
**Tags:** rum\
**Created:** [October 10, 2024, 11:15am UTC](https://discuss.elastic.co/t/is-it-possible-to-make-the-rum-agent-use-the-id-property-instead-of-the-name-property/368622 "2024-10-10T11:15:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casper\_Thrane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casper_thrane/32/49777_2.png) [@Casper\_Thrane](https://discuss.elastic.co/u/Casper_Thrane)\
**Post date:** [October 10, 2024, 11:15am UTC](https://discuss.elastic.co/t/is-it-possible-to-make-the-rum-agent-use-the-id-property-instead-of-the-name-property/368622/1 "2024-10-10T11:15:19Z")

</div>

Hi

Is it possible to make the RUM agent use the id property, instead of the name property?

---

<div class="post-metadata">

**Author:** ![David\_Luna\_Bistuer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_luna_bistuer/32/122147_2.png) [@David\_Luna\_Bistuer](https://discuss.elastic.co/u/David_Luna_Bistuer)\
**Post date:** [October 15, 2024, 7:33am UTC](https://discuss.elastic.co/t/is-it-possible-to-make-the-rum-agent-use-the-id-property-instead-of-the-name-property/368622/2 "2024-10-15T07:33:38Z")

</div>

Hi @Casper_Thrane

I'm assuming you meant using the attribute `id` instead of the `name` attribute to compute the transaction name when the user clicks on a button. If not please expand your question to give more contexts if my assumption is wrong.

To give a transaction name when a element is clicked the RUM agent seeks for

- the attribute `data-transaction-name` in the target element or one of its ancestors
- the attribute `name` in the target element
- If no value is found it falls back to the element tagName

So you may use `data-transaction-name` as a place to add the name you want for your transaction.

Ref: [Supported Technologies | APM Real User Monitoring JavaScript Agent Reference [5.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/rum-js/5.x/supported-technologies.html#user-interactions)

Cheers,  
David
