Add ability for pages to override google analytics page path

This commit is contained in:
Michael Hall 2018-02-01 23:03:12 -05:00
parent 76ef0160b2
commit 51b9530a04
4 changed files with 7 additions and 2 deletions

View file

@ -17,6 +17,7 @@
gtag('js', new Date());
gtag('config', '{{settings.GOOGLE_ANALYTICS_ID}}');
{% block extra_google_analytics %}{% endblock %}
</script>
{% endif %}

View file

@ -1,5 +1,9 @@
{% extends "get_together/base.html" %}
{% block extra_google_analytics %}
gtag('config', '{{settings.GOOGLE_ANALYTICS_ID}}', {'page_path': '/team/+create-event/'});
{% endblock %}
{% block content %}
<h2>Plan a Get Together</h2>
<form action="{% url "create-event" team.id%}" method="post">

View file

@ -41,7 +41,7 @@
<div class="col media">
<img class="mr-1" src="{{attendee.user.avatar}}" width="32px" height="32px">
<div class="media-body">
<h5 class="mt-2 mb-0">{{attendee.user}} <span class="badge badge-success align-top">{{ attendee.status_name }}</span></h5>
<h6 class="mt-2 mb-0">{{attendee.user}} <span class="badge badge-success align-top">{{ attendee.status_name }}</span></h6>
{% if attendee.role > 0 %}<small class="text-muted">{{ attendee.role_name }}</small>{% endif %}
</div>
</div>

View file

@ -46,7 +46,7 @@
<div class="col media">
<img class="mr-1" src="{{member.user.avatar}}" width="32px" height="32px">
<div class="media-body">
<h5 class="mt-0 mb-0">{{member.user}}</h5>
<h6 class="mt-0 mb-0">{{member.user}}</h6>
{% if member.role > 0 %}<small class="text-muted">{{ member.role_name }}</small>{% endif %}
</div>
</div>