Tempo de leitura: 3minutosDomine os comandos HTML essenciais com nosso guia completo. Veja exemplos práticos, dicas avançadas e os comandos mais utilizados.
window.dataLayer = window.dataLayer || [];
function sendPageview() {
window.dataLayer.push({
event: 'pageview',
pagePath: window.location.pathname + window.location.search,
pageTitle: document.title
});
}
window.addEventListener('popstate', sendPageview);
Pular para o conteúdo