<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: XHR request made through a timer isn't reflecting on user actions in Real User Monitoring</title>
    <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191201#M3774</link>
    <description>&lt;P&gt;Hi Julius,&amp;nbsp;&lt;BR /&gt;I will try definitely try the api, I can see the documentation for JavaScript Rum API but no examples on how to&amp;nbsp; integrate with an application. Do I directly use dtrum or need to import it explicitly and then use? It would be great if you could redirect to any examples.&lt;BR /&gt;&lt;BR /&gt;I do have timeout setting enabled. There was on other user action triggered on the panel (a call made to fetch an icon). For now, I have set that to be primary criteria for creation.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2022 19:39:45 GMT</pubDate>
    <dc:creator>KiranAIR</dc:creator>
    <dc:date>2022-07-22T19:39:45Z</dc:date>
    <item>
      <title>XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191130#M3767</link>
      <description>&lt;P&gt;I have a timer observable in angular in the following manner,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;xyz$&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;timer&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1000&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;15&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;pipe&lt;/SPAN&gt;&lt;SPAN&gt;( //Runs&amp;nbsp; every 15 mins and makes service calls&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;switchMap&lt;/SPAN&gt;&lt;SPAN&gt;(() &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;loadMyXHRCall&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;retry&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;share&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; );&lt;BR /&gt;I have a panel component that initiates the subscription to this timer. I am unable to see that xhr user action when the xhr call is made via timer. If I directly call "this.loadMyXHRCall()" , this does get detected.&lt;BR /&gt;&lt;BR /&gt;Am I missing any setting to be enabled?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Jul 2022 19:42:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191130#M3767</guid>
      <dc:creator>KiranAIR</dc:creator>
      <dc:date>2022-07-21T19:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191133#M3768</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/53336"&gt;@KiranAIR&lt;/a&gt;&amp;nbsp; - So this XHR call is initiated &lt;STRONG&gt;without&lt;/STRONG&gt; user input? If this is true, then it won't be detected as user action. User action are - as the name says it - actions initiated by a user. If it's on a background, it's not (typically) a user action.&lt;BR /&gt;&lt;BR /&gt;So if you want this XHR call detected become a user action you have several options:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;call the &lt;A href="https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html" target="_self"&gt;dtrum api&lt;/A&gt;&amp;nbsp;explicitly in your timer (I'd prefer doing it this way) (enterXHRaction / leaveXHRaction)&lt;/LI&gt;&lt;LI&gt;use &lt;STRONG&gt;cux=1&lt;/STRONG&gt;&amp;nbsp;parameter for the RUM JavaScript as described &lt;A href="https://community.dynatrace.com/t5/Real-User-Monitoring/Is-it-possible-to-enable-Javascript-Agent-tracking-all-XHR/td-p/86170" target="_self"&gt;here&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 21 Jul 2022 20:12:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191133#M3768</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2022-07-21T20:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191193#M3772</link>
      <description>&lt;P&gt;Hey Julius,&lt;BR /&gt;This XHR call is initiated on the panel creation. On click of a button, In&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;ngOnInit() on the panel where I subscribe to the timer. Unfortunately, I am injecting the script tag dynamically so that its only used in our Production Environment.&lt;BR /&gt;Like below,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt; &lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;document&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;createElement&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"script"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;configService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;crossOrigin&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;configService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;crossOrigin&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;configService&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;config&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;src&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;document&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getElementsByTagName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'head'&lt;/SPAN&gt;&lt;SPAN&gt;)[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;].&lt;/SPAN&gt;&lt;SPAN&gt;appendChild&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;dynatraceScript&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;So I am unable to call the dtrum api or dT_ object directly.&lt;BR /&gt;&lt;BR /&gt;I tried the cux=1 option, works great for subsequent calls made by the timer and also captured some extra xhr actions which weren't done before. It still doesnt capture the first call made by the timer for me.&lt;BR /&gt;E.g.,&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;xyz$&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;timer&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;1000&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;15&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;pipe&lt;/SPAN&gt;&lt;SPAN&gt;( //Runs&amp;nbsp; every 15 mins and makes service calls&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;switchMap&lt;/SPAN&gt;&lt;SPAN&gt;(()&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;loadMyXHRCall&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;retry&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;share&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;In the above timer, the call flow is from 0,15,30,45....and so on. I am able to catpure the call from 15,30,45 but not the first call made when subscribed to the timer at 0 with the cux option.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Kiran&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 22 Jul 2022 16:11:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191193#M3772</guid>
      <dc:creator>KiranAIR</dc:creator>
      <dc:date>2022-07-22T16:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191196#M3773</link>
      <description>&lt;P&gt;I think if you are injecting the RUM before you are creating the panel, then you should be able to call the dtrum API just fine. You need to handle if it's injected anyway.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For the missing first XHR I can think of two reasons:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;it's already captured in a user action (remember - you clicked a button, so it's initiated by a user)&lt;/LI&gt;&lt;LI&gt;it's some timer thing (check if &lt;A href="https://www.dynatrace.com/support/help/shortlink/capture-xhr-actions#enable-timed-action-support" target="_self"&gt;Timeout functionality&lt;/A&gt; is enabled for the Web App in Dynatrace)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 22 Jul 2022 16:51:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191196#M3773</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2022-07-22T16:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191201#M3774</link>
      <description>&lt;P&gt;Hi Julius,&amp;nbsp;&lt;BR /&gt;I will try definitely try the api, I can see the documentation for JavaScript Rum API but no examples on how to&amp;nbsp; integrate with an application. Do I directly use dtrum or need to import it explicitly and then use? It would be great if you could redirect to any examples.&lt;BR /&gt;&lt;BR /&gt;I do have timeout setting enabled. There was on other user action triggered on the panel (a call made to fetch an icon). For now, I have set that to be primary criteria for creation.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 19:39:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191201#M3774</guid>
      <dc:creator>KiranAIR</dc:creator>
      <dc:date>2022-07-22T19:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: XHR request made through a timer isn't reflecting on user actions</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191204#M3775</link>
      <description>&lt;P&gt;If you download the package in your Dynatrace environment (go to Settings -&amp;gt; Web and mobile monitoring -&amp;gt; Advanced setup) it contains API docs (the same as on the web) and also examples.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You just need to check if the dtrum object is present (e.g. typeof (dtrum) !== "undefined" ) and then call the methods and it should be just fine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 20:32:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/XHR-request-made-through-a-timer-isn-t-reflecting-on-user/m-p/191204#M3775</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2022-07-22T20:32:47Z</dc:date>
    </item>
  </channel>
</rss>

