A
A
Avguston2017-12-28 16:57:31
1C-Bitrix
Avguston, 2017-12-28 16:57:31

Why are Google Analytics goals not working?

Hello. I cant. I fight and fight.
Goals are not readable in Google. Event goals. Not at all. Site on Bitrix.
The main.feedback form is standard. AJAX_MODE is off.
I did
1st option.

if(strlen($arResult["OK_MESSAGE"]) > 0) { ?>
<?=$arResult["OK_MESSAGE"]?>
  <script>
  $(document).ready(function() {
    ga('send','event','left_phone','submit');
  };
  </script>
<?}?>

Option 2.
if(strlen($arResult["OK_MESSAGE"]) > 0) { ?>
<?=$arResult["OK_MESSAGE"]?>
 <script>
window.onload = function() {
  ga('send','event','left_phone','submit');
};
</script>
<?}?>

Option 3 (the worst - because the action on the submit, and not on the correct submission of the form)
<form onsubmit="ga('send','event','left_phone','submit');">

In Google itself, I fill in the goal-event. Category: left_phone. Action: submit
I thought the problem was in the word 'submit' - Changed. does not work.

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