O
O
Oblom4ik2018-11-20 12:30:37
Google Analytics
Oblom4ik, 2018-11-20 12:30:37

How to connect google analytics?

Hello!
There is:

  • site on opencart;
  • google analytics account.

Task:
Hang goals on events.
I googled how it's done, added a goal in the analytics:
Category: main-callback
Action: send
On the site, after pressing the button, a pop-up appears with gratitude and a promise that the manager will call back now.
This pop-up has a built-in Yandex metric goal that works.
I tried to add the analytics code there. Happened:
<script>
  $(document).ready(function () {
    var url_norm = document.location.origin + document.location.pathname;
    ga('send', 'event', 'main-callback', 'send');
    yaCounter34144826.reachGoal('nomer', {URL: url_norm});
  });
</script>

As a result, the goal in Metrica is achieved, but not in Analytics.
What did I do wrong and why is it not working?
PS I tried to create all the same with the addition of the Label.
The effect is similar. Tried adding this via onclick on the submit button. Doesn't work either.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Burban, 2018-11-20
@organizator91

install GTM and test through it whether the event is processed and add the appropriate trigger. First make sure that GTM sees the event and the trigger fires, and then check if the event will be transmitted to GA

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question