소스 검색

Fixing ga in navbar to use new data attrs (#146)

Vince Salvino 6 년 전
부모
커밋
7b875d03b6
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      coderedcms/templates/coderedcms/blocks/base_link_block.html
  2. 1 1
      coderedcms/templates/coderedcms/snippets/navbar.html

+ 4 - 4
coderedcms/templates/coderedcms/blocks/base_link_block.html

@@ -11,11 +11,11 @@
     aria-haspopup="true"
     aria-expanded="false"
     {% endif %}
-    {% if gtag_event_label %}
-    data-gtag-event_label="{{ gtag_event_label }}"
+    {% if ga_event_label %}
+    data-ga-event-label="{{ ga_event_label }}"
     {% endif %}
-    {% if gtag_event_category %}
-    data-gtag-event_category="{{ gtag_event_category }}"
+    {% if ga_event_category %}
+    data-ga-event-category="{{ ga_event_category }}"
     {% endif %}
     >
         {% if value.image %}

+ 1 - 1
coderedcms/templates/coderedcms/snippets/navbar.html

@@ -36,7 +36,7 @@
         {% for item in navbar.menu_items %}
           {% if item.value.page.live %}
             {% is_menu_item_dropdown item.value as has_dropdown %}
-            <li class="nav-item {% if has_dropdown %}dropdown{% endif %}">{% include_block item with aclass="nav-link" gtag_event_category="Navbar Link" %}</li>
+            <li class="nav-item {% if has_dropdown %}dropdown{% endif %}">{% include_block item with aclass="nav-link" ga_event_category="Navbar" %}</li>
           {% endif %}
         {% endfor %}
       </ul>