06 Sep 2023 08:57 AM - last edited on 07 Sep 2023 07:43 AM by MaciejNeumann
Hello,
My question is about relative and absolute JavaScript URLs. We have a website monitored by OA, and it has automatic injection that works perfectly. However, there is an issue when the site uses a login page hosted outside our domain, and the client is redirected to perform the login and then returns to our site. On the redirection page (the one without our agent), we encounter a 404 error with the Dynatrace JavaScript files, and the URL for downloading them is changed to that redirected site, most likely because it's relative. So, my question is, can we ensure that the JavaScript files are downloaded with absolute URLs? any suggestion to approach that scenario ?
06 Sep 2023 09:34 AM
Hi @Saharnir,
I'm trying to understand the scenario, but I think you can go to the application's advanced setup and specify the source path for loading the JS.
also, you can Specify the path where the JavaScript tag should send monitoring data, such as adding the activegate as endpoint
06 Sep 2023 12:43 PM - edited 06 Sep 2023 01:51 PM
Site 1: amazon.com - OA is installed, and JavaScript downloads are working perfectly. You can observe the URLs like https://amazon.com/ruxitagent......js
However, after a few seconds, the site redirects you to the login site, mylogin.amazon.com, which doesn't have OA installed as it's an IDM service. Due to this automatic redirection, you can notice that the URL for downloading the JavaScript has changed. It now appears as mylogin.amazon.com/ruxitagent......js, and this change is a result of using relative URLs.
After completing the login process, the customer is redirected back to the initial site, amazon.com. I hope this explanation clarifies the situation.