Browse Source

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

Vince Salvino 6 years ago
parent
commit
7b875d03b6

+ 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>