# Filter user actions by a http method

**URL:** <https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215>\
**Category:** Real User Monitoring\
**Tags:** user-actions\
**Created:** [January 31, 2023, 6:25pm UTC](https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215 "2023-01-31T18:25:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://community.dynatrace.com/u/laurent)\
**Post date:** [January 31, 2023, 6:25pm UTC](https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215/1 "2023-01-31T18:25:03Z")

</div>

Hey all,

I’m trying to define a couple of user actions same xhrurls, but a different http method.

Any way to do this? I tried to add a placeholder “httpMethod” linked to metadata + define user action with xhrurl + httpMethod equal to my verb, but it seems to not work.

Would the “session and action properties” work with the custom-defined property / server-side request feature? Any example of how to do this?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![agravier](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/agravier/32/29303_2.png) [@agravier](https://community.dynatrace.com/u/agravier)\
**Post date:** [February 1, 2023, 9:51am UTC](https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215/2 "2023-02-01T09:51:30Z")

</div>

Hello&nbsp;[@laurent](https://community.dynatrace.com/user/53350),

My opinion below :

HTTP method is only available on request side not on user actions side.  
So you can create a request attribute to catch the HTTP Method and define this request attribute as a user action properties (it will work only for XHR actions because you will have lot of values during loading page action) :

 ![AurelienGravier_1-1675244559224.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/d/adffef455a8a08730b63e6f63f819abf63971f50.png)

However, you can’t use user action property as a placeholder in naming rules :

 ![AurelienGravier_0-1675244517508.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/5/d51377ad95dd17ccf18824769d5f24144e0d9278.png)

On your case, I recommend using data dtname :

"If the standard action name detection doesn’t serve your purpose, you can also set the&nbsp;data-dtname&nbsp;custom attribute within the HTML tags and use it as a caption. " :

> **[Create custom user action names for web applications in RUM Classic](https://docs.dynatrace.com/docs/observe/digital-experience/rum-classic/web-applications/initial-setup/create-custom-names-for-user-actions)**
>
> Customize automatically generated user action names for your web applications.

Regards,

---

<div class="post-metadata">

**Author:** ![Ana.Kuzmenchuk](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Ana.Kuzmenchuk](https://community.dynatrace.com/u/Ana.Kuzmenchuk)\
**Post date:** [February 7, 2023, 11:27am UTC](https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215/3 "2023-02-07T11:27:47Z")

</div>

Hi&nbsp;[@laurent](https://community.dynatrace.com/user/53350), did the comment above help you solve your issue? Or maybe you found your own solution? Thanks for letting the Community know!

---

<div class="post-metadata">

**Author:** ![Viachaslau](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Viachaslau](https://community.dynatrace.com/u/Viachaslau)\
**Post date:** [May 12, 2023, 12:07pm UTC](https://community.dynatrace.com/t/filter-user-actions-by-a-http-method/38215/4 "2023-05-12T12:07:01Z")

</div>

Another way:  
If no one agent (only rum)

If no time to mark dtname for all XHR (usually if dtname marks is not a part of SDLC - you will wait for implementation CR)

Ask developers add add parameter or anchor in the query dispatcher method,  
than You can parse is via placeholders and create a rule

e.g. {method} {xhr url}

it will be cheap, fast generic solution applied automatically to all XHR you have

 ![Viachaslau_0-1683893057997.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/0741ad97255f5a8a9a84c731a50e4be0d43a62f7.jpeg)
