добавил тестовый вызов га на CourseView

remotes/origin/ga-ecommerce-gleb
Gleb Mikhaylov 6 years ago
parent f01bf27a3a
commit f66de88680
  1. 22
      apps/course/templates/course/course.html
  2. 12
      project/templates/lilcity/layer.html

@ -397,4 +397,26 @@
{% block foot %}
{% include "templates/blocks/popup_course_buy.html" %}
<script type="text/javascript" src="{% static 'course.js' %}"></script>
<script>
console.log('hello from course view!');
console.log('{{ course.id }}');
console.log('{{ course.title }}');
gtag('event', 'select_content', {
"content_type": "product",
"items": [
{
"id": "{{ course.id }}",
"name": "{{ course.title }}",
"list_name": "Search Results",
"brand": "Google",
"category": "Apparel/T-Shirts",
"variant": "Black",
"list_position": 1,
"quantity": 2,
"price": "{{course.price}}"
}
]
});
</script>
{% endblock foot %}

@ -74,14 +74,24 @@
</noscript>
<!-- End Facebook Pixel Code -->
<!-- Global site tag (gtag.js) - Google Ads: 808701460 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121923960-1"></script>
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-121923960-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
//gtag('config', 'AW-808701460');
gtag('config', 'UA-121923960-1');
</script> -->
<!-- Test site tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121923960-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-121923960-4');
</script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function (d, w, c) {

Loading…
Cancel
Save