R
R
rmkk2018-01-19 17:24:11
Facebook
rmkk, 2018-01-19 17:24:11

Sharing google/yandex/fbPixel targets on onsubmit event?

Can you tell me how to use the Facebook pixel event on form submission?
Google/Yandex works like this:

<form class="contacts-form" onsubmit="gtag('event', 'sendform', { 'event_category': 'формы', 'event_action': 'заявка', }); yaCounter65692812.reachGoal('forms_ok'); return true;">

The task is to add an FB pixel event.
If you just insert it like this (fb code in the same line) - it does not work:
<form class="contacts-form" onsubmit="fbq('track', 'Lead'); gtag('event', 'sendform', { 'event_category': 'формы', 'event_action': 'заявка', }); yaCounter65692812.reachGoal('forms_ok'); return true;">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Felix_vek, 2018-02-08
@Felix_vek

Good afternoon,
no, the method you described does not need to be used.
It is best to set up the activation of these goals through Google Tag Mangar, and not through the onsubmit tag.
Or call an event using js and only then pass it to three different sources.
If everything is hung up on onsubmit, then definitely everything will not be transmitted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question