• EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Esta tradução de máquina é fornecida para sua comodidade.

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.

Criar um problema

save (SPA API)

Sintaxe

newrelic.interaction().save()

Garante que uma interação do browser SPA será salva quando terminar.

Requisitos

Descrição

Este método SPA garante que uma interação do browser será salva quando terminar. Normalmente uma interação só é salva e enviada para New Relic se for um carregamento inicial de página ou se resultar em uma URL ou aplicação de alteração de hash. Você deve chamar esse método para substituir esse comportamento e garantir que a interação será registrada.

Valores de retorno

Este método retorna o mesmo objeto de API criado por interaction(), que está associado a um eventoBrowserInteraction .

Exemplos

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.