1.1.16 add YandexMetrika tag for create_routes, registration button in header/footer

This commit is contained in:
2024-06-21 14:54:30 +03:00
parent 729f03ca47
commit 2fc153843f
3 changed files with 18 additions and 2 deletions

View File

@@ -541,7 +541,7 @@ function sendRoute(el, routeID = null){
// if (selected_owner_type[0].classList.contains('selected')){
//
// }else{}
let owner_type_value = document.getElementById('hide_owner_type').value
let owner_type_value = document.getElementById('hide_owner_type').value
let form = el.form
let formData = new FormData(form);
@@ -596,6 +596,18 @@ function sendRoute(el, routeID = null){
my_routes.classList.add('selected')
middleWareJS()
if(data.owner_type === 'customer' && typeof ym === 'function' ){
ym(97070898,'reachGoal','customer')
return true
} else if(data.owner_type === 'mover' && typeof ym === 'function'){
ym(97070898,'reachGoal','mover')
return true
}
//
},
error: function (data, exception){
document.querySelector(".info_profile").innerHTML = data.responseJSON.html;

View File

@@ -64,7 +64,10 @@
{% if not user.is_authenticated %}
<div class="fifth-column">
<a class="fifth-column-first" href="{% url "registration_page" %}">{% trans "Регистрация" %}</a>
<a
class="fifth-column-first"
onclick="ym(97070898,'reachGoal','reg_button_footer'); return true;"
href="{% url "registration_page" %}">{% trans "Регистрация" %}</a>
<a href="{% url "login_profile" %}">{% trans "Войти" %}</a>
</div>
{% endif %}

View File

@@ -106,6 +106,7 @@
<div class="header_buttons">
<a
class="registration_button"
onclick="ym(97070898,'reachGoal','reg_button_header'); return true"
href="{% url "registration_page" %}">
{% trans "Регистрация" %}
</a>