31 Jan 2023 06:25 PM - last edited on 07 Feb 2023 11:26 AM by Ana_Kuzmenchuk
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!
Solved! Go to Solution.
01 Feb 2023 09:51 AM
Hello @laurent,
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) :
However, you can't use user action property as a placeholder in naming rules :
On your case, I recommend using data dtname :
"If the standard action name detection doesn't serve your purpose, you can also set the data-dtname custom attribute within the HTML tags and use it as a caption. " :
https://www.dynatrace.com/support/help/shortlink/custom-names#change-action-name-via-data-dtname
Regards,
07 Feb 2023 11:27 AM
Hi @laurent, did the comment above help you solve your issue? Or maybe you found your own solution? Thanks for letting the Community know!
12 May 2023 01:07 PM - edited 12 May 2023 01:07 PM
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