What triggers "App not responding" in embedded/iframe view?

We’re having an issue with our Atlassian Connect app for both Jira and Confluence. In certain circumstances our users see “App not responding” when clicking “Get started”

This appears to happen in the following cases:

  1. In Safari and the “Prevent tracking” option is enabled
  2. In an incognito/private browsing window in Chrome and Firefox

It seems to be related to our use of Segment in our webapp that is loaded within the iframe. Obviously the tracking prevention/incognito options prevent it from loading properly, but the app still works fine within the iframe even though it says “App is not responding”

So my question is what actually triggers the “App is not responding” message? Is there any way we can trigger an API through the all.js to mark the app as loaded?