<?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 Appdynamics initialization in angular component in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Appdynamics-initialization-in-angular-component/m-p/738494#M10960</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;I want to send custom user data from components dynamically.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;How can I initialize appdynamics in a component instead of index.html?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Sep 2021 08:21:52 GMT</pubDate>
    <dc:creator>Subhajit_Rajak</dc:creator>
    <dc:date>2021-09-22T08:21:52Z</dc:date>
    <item>
      <title>Appdynamics initialization in angular component</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Appdynamics-initialization-in-angular-component/m-p/738494#M10960</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN&gt;I want to send custom user data from components dynamically.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;How can I initialize appdynamics in a component instead of index.html?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 08:21:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Appdynamics-initialization-in-angular-component/m-p/738494#M10960</guid>
      <dc:creator>Subhajit_Rajak</dc:creator>
      <dc:date>2021-09-22T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Appdynamics initialization in angular component</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Appdynamics-initialization-in-angular-component/m-p/738495#M10961</link>
      <description>&lt;P&gt;Hi Subhajit,&lt;/P&gt;
&lt;P&gt;Thanks for posting question to our community!&lt;/P&gt;
&lt;P&gt;I made a angular demo with javascript agent involved in component.&lt;/P&gt;
&lt;P&gt;Here is the template of my com&lt;SPAN&gt;ponent.ts&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot1 16.53.10.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35390i045865968108162C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;As you can see in my demo, I created element called "script" and added it into "target" by using getElementById method.&lt;BR /&gt;(I added a div tag in index.html beforehand and its id is target)&lt;/P&gt;
&lt;P&gt;Then I wrote a text which including all necessary information for javascript agent configuration.&lt;/P&gt;
&lt;P&gt;Also I added some custom user data into PageView and saved it into config.userEventInfo in the text.&lt;/P&gt;
&lt;P&gt;Then as you can see the screenshot of my controller, you can find some custom user data and my javascript agent started up normally.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot2 16.53.12.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35372i3BFD26DF48245175/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please note that although you can add javascript agent configuration into other child components, it won't monitor your browser until you have accessed the virtual page(defined by your child component) for the first time.&lt;BR /&gt;So it's necessary to add javascript into parent page(defined by app.component.ts)&lt;/P&gt;
&lt;P&gt;Here is the documentation about adding Custom User Data to a Page Browser Snapshot(Shown up in your controller UI)&lt;BR /&gt;&lt;A href="https://docs.appdynamics.com/appd/4.5.x/en/end-user-monitoring/browser-monitoring/browser-real-user-monitoring/configure-the-javascript-agent/add-custom-user-data-to-a-page-browser-snapshot" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/appd/4.5.x/en/end-user-monitoring/browser-monitoring/browser-real-user-monitoring/configure-the-javascript-agent/add-custom-user-data-to-a-page-browser-snapshot&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope this answer helps! &lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Xiangning&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 08:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Appdynamics-initialization-in-angular-component/m-p/738495#M10961</guid>
      <dc:creator>Xiangning_Mao</dc:creator>
      <dc:date>2022-11-21T08:13:21Z</dc:date>
    </item>
  </channel>
</rss>

