HTML form based redirects are missing by the APM Browser Agent
search cancel

HTML form based redirects are missing by the APM Browser Agent

book

Article ID: 378037

calendar_today

Updated On:

Products

CA Application Experience Analytics SaaS (AXA) CA App Experience Analytics

Issue/Introduction

We have noticed that sometimes form based redirects (redirecting using an onLoad script) are not being tracked.

Environment

  • DX APM SaaS
  • DX AXA onpremise

Cause

This problem is related to defect #DE614165.

We are currently using navigator.sendBeacon to send data to the web server when this event occurs. However, we have encountered a problem where the navigator fails to send the data might be because of redirection happening immediately, resulting in the data not being transmitted.

We are evaluating to send the data synchronously in a feature release

Resolution

Workaround

Set up a ‘0-second’ delay on the redirect , you can call the form action as below:

window.onload = function() {

        setTimeout(() => {

          document.forms[0].submit();

        }, 0);

      }

 

 

Additional Information