M
M
Mesuti2020-05-27 18:09:18
Google Analytics
Mesuti, 2020-05-27 18:09:18

Why might gtag() google analytics events not fire?

Hey!
Again I ran into the debiloid logic of Google.

I set a goal, when you click in the console.log, the command passes.
It doesn't show up in google analytics.

What could be the problem?
Created a goal with the same name, category and event

var whatsAppBtn = document.querySelector('.link');
if (whatsAppBtn) {
    whatsAppBtn.addEventListener('click', function () {
        gtag('event', 'Клик по ссылке WhatsApp', {
            'event_category': 'Click',
            'event_action': 'whatsapp'
        });
        console.log('WhatsApp');
    });
}

5ece82f581324380548973.png

p.s. that doesn't work either.
window.onload = function () {
    gtag('event', 'loaded');
        console.log('loaded page')
}


Two debiloids - Google and Facebook.
You need to read three encyclopedias in order to set one shit goal

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Denisov, 2020-05-27
@DeoZ

Try this code (do not change anything in the Google Analytics goal settings):

gtag('event', 'whatsapp', {
  'event_category' : 'Click'
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question