V
V
Veritas232019-04-06 21:58:49
Google Analytics
Veritas23, 2019-04-06 21:58:49

How to set a link click target in Google Analytics and Yandex.Metrica together?

Added code to the form

input type="button" onclick="ym( 1234567 , 'reachGoal', ' ID_IDEN '); return true;" onclick="gtag('event', 'clickdopphone', { 'event_category': ' ID_IDEN ', 'event_action': ' click ', });"

The problem is that everything is transferred to Metrica correctly, but in GA there is not a single achievement of the goal.
How to configure correctly for GA?

Data is transferred to the metric, but not to GA (more precisely, Global Site Tag) - no
Setting in GA
5ca8f6a77f7b0899126601.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rikcon, 2019-04-06
@Veritas23

input type="button" onclick="ym(1234567, 'reachGoal', 'ID_IDEN'); gtag('event', 'clickdopphone', { 'event_category': 'ID_IDEN', 'event_action': 'click', }); return true;"

This is how it should work, of course it's better to put it all in a separate function
PS Briefly, what was the problem, you have return true; immediately after working out the click with Yandex, and the GA is moved to another on-click, of course I didn’t check it, but I doubt very much that it works like that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question