Syntax
newrelic.interaction().save()
Ensures a SPA browser interaction will be saved when it ends.
Requirements
Agent version nr-963 or higher.
Description
This SPA method ensures a browser interaction will be saved when it ends. Normally an interaction is only saved and sent to New Relic if it is an initial page load or if it results in a URL or hash change. You must call this method to override this behavior and guarantee the interaction will be recorded.
Return values
This method returns the same API object created by interaction()
, which is associated with a BrowserInteraction
event.
Examples
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. }})
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicのデータセキュリティとライセンスドキュメント をご確認ください。