cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

js injection - redirection to login site

Saharnir
Observer

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 ?   

2 REPLIES 2

Mohamed_Hamdy
DynaMight Champion
DynaMight Champion

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.

Mohamed_Hamdy_0-1693988831858.png

also, you can Specify the path where the JavaScript tag should send monitoring data, such as adding the activegate as endpoint

Certified Dynatrace Professional | Certified Dynatrace Services Delivery - Observability & CloudOps | Dynatrace Partner - yourcompass.ca

Saharnir
Observer

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.