• EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

사용자의 편의를 위해 제공되는 기계 번역입니다.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

문제 신고

save (SPA API)

통사론

newrelic.interaction().save()

SPA 브라우저 상호 작용이 종료될 때 저장되도록 합니다.

요구 사항

설명

이 SPA 방법은 브라우저 상호 작용이 종료될 때 저장되도록 합니다. 일반적으로 상호 작용은 초기 페이지 로드이거나 URL 또는 해시 변경이 발생하는 경우에만 저장되고 New Relic으로 전송됩니다. 이 동작을 재정의하고 상호 작용이 기록되도록 보장하려면 이 메서드를 호출해야 합니다.

반환 값

이 메서드는 BrowserInteraction 이벤트 와 연결된 interaction() 에 의해 생성된 동일한 API 객체를 반환합니다.

window.addEventListener('scroll', () => {
if (atBottomOfPage()) {
newrelic.interaction() // Start monitoring this interaction.
.setName('loadNextPage') // Set name of interaction.
.save(); // Ensure that this interaction will be saved as a BrowserInteraction event when it ends.
loadNextPage(); // Start loading the next page.
}
});
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.