• 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 メソッドは、ブラウザのインタラクションが終了したときに保存されることを保証します。通常、インタラクションが保存されて New Relic に送信されるのは、最初のページロードの場合や、URL やハッシュの変更があった場合のみです。この動作をオーバーライドし、インタラクションが記録されることを保証するには、このメソッドを呼び出す必要があります。

戻り値

このメソッドは、 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株式会社。

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