Problem Description: App Id is not captured in Google Tag manager some time on submit button click event in Mobile App.
Problem Background : I am having verify OTP page(OTP grid) and Submit button in Vue 2 components and used Google Tag Manager with below code. App Id will comes in URL as param on my login page and saved in Session Storage >> User Enter Login details >> Verify OTP page. When user entered wrong OTP and click on Submit button then all values from datalayer is always captured in GTM except app Id(Intermittent) which we are reading from browser session storage :
window.dataLayer.push({
event: "trackEvent",
"eventDetails.action": "val1",
"eventDetails.action": "load",
"eventDetails.label": "load - reg",
"appId": sessionStorage.getItem("appId") // Saved in session storage on login page
});