Share page: add event tracking to copy button [#14199] (#14359)

This commit is contained in:
Craig Cook 2024-03-27 10:07:11 -07:00 коммит произвёл GitHub
Родитель 3a7c190bf7
Коммит 8ca666fb56
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -24,4 +24,19 @@ function copyText() {
textCopiedMessage.style.display = 'none';
copyButtonText.style.display = 'block';
}, 2500);
// UA
window.dataLayer.push({
event: 'in-page-interaction',
eAction: 'copy',
eLabel: 'Copy and share'
});
// GA4
window.dataLayer.push({
event: 'widget_action',
type: 'copy',
action: 'copy',
name: 'Copy and share'
});
}