O
O
Oleg Olegovich2021-03-30 15:25:07
Google Analytics
Oleg Olegovich, 2021-03-30 15:25:07

Creating goals in GTM for Google Analytics 4 based on onclick events from Yandex Metrika?

Hello! I am a contextualist. The customer had a need to create goals in Google Analytics (GA 4) based on the goals created in Yandex Metrika (YM).
There are several buttons on the site, they all have the same class, no id (they don’t want to add), but each has a unique onclick event from YM:

onclick="ym(<код_счетчика>, 'reachGoal', '<идентификатор_цели>'); return true;"

GA 4 and YM counters added via Google Tag Manager (GTM).
Question: how to add targets for GA 4 via GTM (what combination of tag (GA 4 event) + trigger + variable) using button identification via onclick event?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question