Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions funnel/assets/js/utils/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ const Analytics = {
value,
});
}
if (typeof window._paq !== 'undefined') {
let _paq = window._paq;
gtag('event', category, {
event_category: action,
event_label: label,
value,
});
_paq.push(['trackEvent', category, action, label, value]);
}
},
init() {
// Send click events to Google analytics
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/account_menu.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
{{ csrf_tag() }}
<button class="mui-btn mui-btn--nostyle text-capitalize header__dropdown__item header__dropdown__item--flex mui--text-subhead mui--text-light"
type="submit"
data-cy="Logout">
data-cy="Logout" data-ga="Logout">
<span class="profile-avatar profile-avatar--bigger margin-right">{{ faicon(icon='sign-out', baseline=false) }}</span>{% trans %}Logout{% endtrans %}
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/layout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
</div>
{%- elif request.endpoint != 'login' %}
<a href="{{ url_for('login') }}"
class="mui-btn mui-btn--primary mui-btn--small mui-btn--raised header__button" id="login-nav">{% trans %}Login{% endtrans %}</a>
class="mui-btn mui-btn--primary mui-btn--small mui-btn--raised header__button" id="login-nav" data-ga="Login">{% trans %}Login{% endtrans %}</a>
{%- else %}
{# On the login page, remove the login button but occupy the spot -#}
<div></div>
Expand Down
10 changes: 5 additions & 5 deletions funnel/templates/macros.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
<a class="mui--text-light" href="{{ url_for('login', next=request.path) }}" data-ga="Login to save project" aria-label="{% trans %}Login to save this project{% endtrans %}">{{ faicon(icon='bookmark', baseline=true, icon_size=iconsize, css_class="mui--text-light") }}</a>
{%- else %}
<input type="hidden" name="save" value=""/>
<button type="submit" value="true" class="mui-btn mui-btn--nostyle animate-btn {% if not project.is_saved_by(current_auth.user) %} animate-btn--show {% endif %}" data-ga="Save this project" onclick="this.form.save.value=this.value" data-cy="bookmark" aria-label="{% trans %}Save this project{% endtrans %}">{{ faicon(icon='bookmark', baseline=true, icon_size=iconsize, css_class="mui--text-light") }}
<button type="submit" value="true" class="mui-btn mui-btn--nostyle animate-btn {% if not project.is_saved_by(current_auth.user) %} animate-btn--show {% endif %}" data-ga="Save this project" onclick="this.form.save.value=this.value" data-cy="bookmark" aria-label="{% trans %}Save this project{% endtrans %}" data-ga="bookmark">{{ faicon(icon='bookmark', baseline=true, icon_size=iconsize, css_class="mui--text-light") }}
</button>
<button type="submit" value="false" class="mui-btn mui-btn--nostyle animate-btn animate-btn--saved{% if project.is_saved_by(current_auth.user) %} animate-btn--show {% endif %}" data-ga="Unsave this project" onclick="this.form.save.value=this.value" data-cy="bookmarked" aria-label="{% trans %}Unsave this project{% endtrans %}">{{ faicon(icon='bookmark-solid', baseline=true, icon_size=iconsize, css_class="bookmarked") }}</button>
<button type="submit" value="false" class="mui-btn mui-btn--nostyle animate-btn animate-btn--saved{% if project.is_saved_by(current_auth.user) %} animate-btn--show {% endif %}" data-ga="Unsave this project" onclick="this.form.save.value=this.value" data-cy="bookmarked" aria-label="{% trans %}Unsave this project{% endtrans %}" data-ga="unsave project">{{ faicon(icon='bookmark-solid', baseline=true, icon_size=iconsize, css_class="bookmarked") }}</button>
{%- endif %}
</div>
</form>
Expand Down Expand Up @@ -440,7 +440,7 @@
{%- macro add_submission_btn(project) %}
{%- if project.state.PUBLISHED %}
<div class="project-details__box__content--lesspadding propose js-cfp-status {% if not project.cfp_state.OPEN -%} mui--hide {%- endif %}">
<a class="mui-btn mui-btn--accent mui-btn--raised display-block" href="{{ project.url_for('new_proposal') }}" data-cy="propose-a-session">{% trans %}Make a submission{% endtrans %}</a>
<a class="mui-btn mui-btn--accent mui-btn--raised display-block" href="{{ project.url_for('new_proposal') }}" data-cy="propose-a-session" data-ga="Make a submission">{% trans %}Make a submission{% endtrans %}</a>
{% if project.cfp_end_at_localized -%}<p class="mui--text-body2 mui--text-light">{% trans date=project.cfp_end_at_localized|datetime(format='dd MMM YYYY, hh:mm a') %}Accepting submissions till {{ date }}{% endtrans %}</p>{% endif %}
</div>
{%- endif %}
Expand All @@ -467,7 +467,7 @@
{% endif %}
{%- if account.membership_project and not is_member %}
<div class="profile-card__btn-wrapper">
<p class=" mui--text-center mui--text-caption mui--text-light top-padding margin-bottom">{% trans tcount=account.published_project_count, count=account.published_project_count|numberformat %}One project{% pluralize tcount %}{{ count }} projects{% endtrans %}</p>
<p class="mui--text-center mui--text-caption mui--text-light top-padding margin-bottom">{% trans tcount=account.published_project_count, count=account.published_project_count|numberformat %}One project{% pluralize tcount %}{{ count }} projects{% endtrans %}</p>
<a class="mui-btn mui-btn--primary mui-btn--raised full-width-btn" href="{{ account.url_for(_anchor='membership') }}" data-ga="Become a member(homepage)">{% trans %}Become a member{% endtrans %}</a>
</div>
{% else %}
Expand All @@ -476,7 +476,7 @@
{% endif %}
<div class="profile-card__btn-wrapper">
<p class=" mui--text-center mui--text-caption mui--text-light top-padding margin-bottom">{% trans tcount=account.published_project_count, count=account.published_project_count|numberformat %}One project{% pluralize tcount %}{{ count }} projects{% endtrans %}</p>
<a class="mui-btn mui-btn--dark mui-btn--raised full-width-btn" href="{{ account.url_for() }} ">{% trans %}Explore{% endtrans %}</a>
<a class="mui-btn mui-btn--dark mui-btn--raised full-width-btn" href="{{ account.url_for() }} " data-ga="Explore account(homepage)">{% trans %}Explore{% endtrans %}</a>
</div>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/profile.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<div class="membership-container__btn-wrapper"><button class="mui-btn mui-btn--accent mui-btn--small zero-bottom-margin zero-top-margin mui--is-disabled display-block">{% trans %}You are a member{% endtrans %}</button></div>
{% elif membership_project.features.show_tickets %}
<div class="membership-container__btn-wrapper">
<button class="js-open-ticket-widget mui-btn mui-btn--primary price-btn zero-bottom-margin zero-top-margin display-block">
<button class="js-open-ticket-widget mui-btn mui-btn--primary price-btn zero-bottom-margin zero-top-margin display-block" data-ga="Become a member">
<span class="price-btn__txt" data-cy="unregistered">{% trans %}Become a member{% endtrans %}</span>
<span class="price-btn__txt price-btn__txt--smaller primary-color-lighter-txt js-tickets-available"><span class="js-ticket-price"></span></span>
<span class="price-btn__txt price-btn__txt--smaller mui--text-light js-tickets-not-available mui--hide">{% trans %}Sales closed{% endtrans %}</span>
Expand Down
12 changes: 6 additions & 6 deletions funnel/templates/profile_layout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
{% endif %}
<div>
{%- if featured_project.livestream_urls %}
<a class="mui-btn mui-btn--primary mui-btn--raised" aria-label="{% trans %}Watch livestream{% endtrans %}" href="{{ featured_project.url_for() }}">{% trans %}Livestream{% endtrans %}</a>
<a class="mui-btn mui-btn--primary mui-btn--raised" aria-label="{% trans %}Watch livestream{% endtrans %}" href="{{ featured_project.url_for() }}" data-ga="Watch livestream">{% trans %}Livestream{% endtrans %}</a>
{%- endif %}
{%- if current_sessions.sessions|length > 0 %}
<a class="mui-btn mui-btn--primary mui-btn--raised" href="{{ featured_project.url_for('schedule') }}">{% trans %}Schedule{% endtrans %}</a>
<a class="mui-btn mui-btn--primary mui-btn--raised" href="{{ featured_project.url_for('schedule') }}" data-ga="Live schedule">{% trans %}Schedule{% endtrans %}</a>
{%- endif %}
</div>
</div>
Expand Down Expand Up @@ -75,14 +75,14 @@
<div class="grid__col-md-6 grid__col-lg-7 mui--text-left spotlight-container__details mui--hidden-xs mui--hidden-sm mui--hidden-md">
<div class="flex-wrapper flex-wrapper--center flex-wrapper--space-between margin-bottom">
<div class="flex-wrapper flex-wrapper--center">
<a href="{{ featured_project.account.absolute_url }}" class="profile-avatar margin-right" data-ga="View account">
<a href="{{ featured_project.account.absolute_url }}" class="profile-avatar margin-right" data-ga="View spotlight account">
{%- if featured_project.account.logo_url.url %}
<img src="{{ featured_project.account.logo_url.resize(img_size.profile_logo_small) }}" alt="{{ featured_project.account.title }}"/>
{% else %}
<img src="{{ url_for('static', filename='img/default-profile-logo.png') }}" alt="{{ featured_project.account.title }}"/>
{% endif %}
</a>
<a href="{{ featured_project.account.absolute_url }}" class="profile-avatar-title mui--text-subhead text-bold mui--text-dark nounderline" data-ga="View account">{{ featured_project.account.title }}</a>
<a href="{{ featured_project.account.absolute_url }}" class="profile-avatar-title mui--text-subhead text-bold mui--text-dark nounderline" data-ga="View spotlight account">{{ featured_project.account.title }}</a>
</a>
</div>
{%- if not current_auth.is_anonymous %}
Expand All @@ -93,7 +93,7 @@
<h3 class="mui--text-headline text-bold" data-cy="spotlight-project"><a href="{{ featured_project.url_for() }}" class="mui--text-dark nounderline">{{ featured_project.title }}</a></h3>
<p class="mui--text-subhead mui--text-light js-truncate" data-truncate-lines="2">{{ featured_project.tagline }}</p>
<div class="bottom-padding mui--text-light mui--hidden-lg mui--hidden-xl">{% if featured_project.primary_venue %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {% if featured_project.primary_venue.city %}{{ featured_project.primary_venue.city }}{% else %}{{ featured_project.primary_venue.title }}{% endif %}{% elif featured_project.location %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {{ featured_project.location }}{% endif %}</div>
<a href="{{ featured_project.url_for() }}" class="mui--text-body2 text-uppercase nounderline">{% trans %}Learn more{% endtrans %}</a>
<a href="{{ featured_project.url_for() }}" class="mui--text-body2 text-uppercase nounderline" data-ga="View spotlight project">{% trans %}Learn more{% endtrans %}</a>
</div>
<div class="grid__col-md-1 grid__col-lg-1 mui--hidden-xs mui--hidden-sm mui--hidden-md">
</div>
Expand All @@ -116,7 +116,7 @@
{% endif %}
</div>
<div class="card__image-wrapper {% if not featured_project.bg_image.url %}card__image-wrapper--default{% endif %}">
<a href="{{ featured_project.url_for() }}" data-cy-title="{{ featured_project.title }}" data-ga="View featured project">
<a href="{{ featured_project.url_for() }}" data-cy-title="{{ featured_project.title }}" data-ga="View spotlight project">
{% if featured_project.bg_image.url %}
<img class="card__image js-lazyload-img" data-src="{{ featured_project.bg_image.resize(img_size.card_banner) }}" alt="{{ featured_project.title }}"/>
<noscript>
Expand Down
8 changes: 4 additions & 4 deletions funnel/templates/project_layout.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
{% macro buy_button(project, include_eyebrow_text=true) %}
<div class="register-block__content">
{% if include_eyebrow_text %}<span class="register-block__content__txt mui--text-light">{% trans %}Hybrid access (members only){% endtrans %}</span>{% endif %}
<button class="js-open-ticket-widget register-block__btn mui-btn mui-btn--primary">
<button class="js-open-ticket-widget register-block__btn mui-btn mui-btn--primary" data-ga="Buy tickets">
{% if project.features.subscription %}
<span class="register-block__btn__txt" data-cy="unregistered">{% trans %}Become a member{% endtrans %}</span>
{%- else %}
Expand Down Expand Up @@ -176,7 +176,7 @@
<form action="{{ project.url_for('deregister') }}" method="post" class="form-inline">
{{ csrf_tag() }}
<div class="mui--text-right">
<button class="mui-btn mui-btn--raised" type="submit" name="submit" value="no" data-cy="cancel-rsvp">{% if project.features.follow_mode %}{% trans %}Stop following{% endtrans %}{% else %}{% trans %}Confirm cancellation{% endtrans %}{% endif %}</button>
<button class="mui-btn mui-btn--raised" type="submit" name="submit" value="no" data-cy="cancel-rsvp" data-ga="cancel-rsvp">{% if project.features.follow_mode %}{% trans %}Stop following{% endtrans %}{% else %}{% trans %}Confirm cancellation{% endtrans %}{% endif %}</button>
</div>
</form>
</div>
Expand Down Expand Up @@ -483,10 +483,10 @@
<a id="submissions" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'submissions' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('view_proposals') }}" data-cy-navbar="submissions">{% trans %}Submissions{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
{%- endif %}
{%- if project.current_roles.editor or project.schedule_start_at or current_page == 'schedule' %}
<a id="schedule" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'schedule' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('schedule') }}" data-cy-navbar="schedule">{% trans %}Schedule{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
<a id="schedule" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'schedule' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('schedule') }}" data-cy-navbar="schedule" data-ga="Schedule">{% trans %}Schedule{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
{%- endif %}
{% if project.has_sessions_with_video %}
<a id="videos" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'videos' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('session_videos') }}" data-cy-navbar="videos">{% trans %}Videos{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
<a id="videos" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'videos' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('session_videos') }}" data-cy-navbar="videos" data-ga="Videos">{% trans %}Videos{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
{%- endif %}
<a id="crew" class="js-spa-navigate sub-navbar__item mui--text-subhead mui--text-dark {% if current_page == 'crew' %}sub-navbar__item--active{%- endif %}" href="{{ project.url_for('crew') }}" data-cy-navbar="crew">{% trans %}Crew{% endtrans %} <span class="sub-navbar__item__icon mui--pull-right">{{ faicon(icon='chevron-right', icon_size='subhead') }}</span></a>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion funnel/templates/rsvp_modal.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
<p class="mui--text-body2 top-padding zero-bottom-margin">{% trans %}This will share your name and email address or phone number with the project’s promoter so they can keep you updated. You can cancel your registration at any time{% endtrans %}</p>
<div class="mui--text-right">
<button class="mui-btn mui-btn--raised" type="submit" name="submit" value="yes" data-cy="confirm">{% trans %}Confirm{% endtrans %}</button>
<button class="mui-btn mui-btn--raised" type="submit" name="submit" value="yes" data-cy="confirm" data-ga="confirm">{% trans %}Confirm{% endtrans %}</button>
</div>
</form>
{{ json_form_template() }}
Expand Down