A
A
Anton2016-08-12 14:56:20
Google
Anton, 2016-08-12 14:56:20

How to set the goal of Yandex metrics and GA in one GTM tag?

Hello!
In one of the projects we use Y.metrics and GA.
I set up targets in Y.metrics and created tags for them in GTM (tag type "Custom HTML tag").
To trigger the goal of Y.metrics, I use:
yaCounterXXXXXXX.reachGoal('PopupBuyButton');
When I finished with the goals in Y.metrics and moved on to GA, a question appeared. By default, it is proposed to work with GA goals in GTM through a ready-made tag template - Google Analytics. But in my case it will double the number of tags. I would like to avoid this.
As far as I understand, through custom HTML it is also possible using some code to make the GA target work.
I'm trying this so far, but without success:

yaCounterXXXXXXX.reachGoal('PopupBuyButton');
ga('send', 'event', 'Click', 'ClickButton', 'PopupBuyButton');

The task is quite standard, in two counters to count targets through GTM. Who can already faced? Or are there any suggestions? Maybe I'm not doing it right?
For clarity, I will attach the GA goal and the GTM tag
1a3a6cb5b58a4c3cb499fb18dc585248.JPG
And here is the tag
21a842189b194e0e8b43a4c58201a2bb.JPG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kalaganov, 2018-04-17
@Kalaganov5

There is a detailed description of the Yandex metric here:
https://kalaganov5.ru/nastroit-celi-yandeks-metrik...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question