• EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Te ofrecemos esta traducción automática para facilitar la lectura.

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.

Crea una propuesta

save (SPA API)

Sintaxis

newrelic.interaction().save()

Garantiza que una interacción browser SPA se guardará cuando finalice.

Requisitos

Descripción

Este método SPA garantiza que la interacción browser se guardará cuando finalice. Normalmente, una interacción solo se guarda y se envía a New Relic si se trata de una carga de página inicial o si resulta en una URL o un cambio de hash. Debe llamar a este método para anular este comportamiento y garantizar que se registre la interacción.

Valores de retorno

Este método devuelve el mismo objeto API creado por interaction(), que está asociado con un eventoBrowserInteraction .

Ejemplos

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.