Permalink
Browse files

Fix Bug 853687 Add GA Click Tracking To Creative Brief DL

pull request fixes
  • Loading branch information...
1 parent 47d849b commit 284794293b455499b1327fa30ca9cd55a26482ae @bensternthal bensternthal committed with Osmose Mar 22, 2013
@@ -0,0 +1,11 @@
+// All click based event tracking should go here
+
+$(function() {
+ 'use strict';
+
+ // Tracks Creative Brief PDF Download
+ $('.ga_brief-dl').click(function() {
+ _gaq.push(['_trackEvent', 'Downloads', 'PDF', 'Creative Brief']);
+ return true;
+ });
+});
@@ -75,5 +75,6 @@
{{ js('jquery') }}
{{ js('browserid') }}
{{ js('flicks_js') }}
+ {{ js('google_analytics_events') }}
<script src="https://www.mozilla.org/tabzilla/media/js/tabzilla.js"></script>
{% endblock %}
@@ -35,15 +35,15 @@ <h2 id="q1">{{ _('What is Firefox Flicks?') }}</h2>
{% trans link_brief=settings.LINK_BRIEF[request.locale] %}
With that in mind, the 2013 Firefox Flicks theme is "Get Mobilized."
That's where you come in: help us inspire people to get mobilized for
- individual and collective progress. <a href="{{ link_brief }}">Read the creative brief</a>.
+ individual and collective progress. <a href="{{ link_brief }}" class="ga_brief-dl">Read the creative brief</a>.
{% endtrans %}
</p>
<h2 id="q2">{{ _('Where can I find out more about this year\'s theme and requirements?') }}</h2>
<p>
{% trans link_brief=settings.LINK_BRIEF[request.locale] %}
Everything you need to know about creating a flick for the contest
- can be found in the filmmakers' <a href="{{ link_brief }}">creative brief</a>.
+ can be found in the filmmakers' <a href="{{ link_brief }}" class="ga_brief-dl">creative brief</a>.
{% endtrans %}
</p>
@@ -44,7 +44,7 @@ <h1 class="section-title">{{ _('You&#8217;re the director. Mobile is the star.')
the Grand Prize.
{% endtrans %}
</p>
- <p class="act"><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="go" rel="external">{{ _('Get the creative brief') }}</a></p>
+ <p class="act"><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="go ga_brief-dl" rel="external">{{ _('Get the creative brief') }}</a></p>
</div>
</div>
@@ -73,7 +73,7 @@ <h1 class="section-title">{{ _('You&#8217;re the director. Mobile is the star.')
</li>
<li>
<h3>{{ _('Start thinking about your flick') }}</h3>
- <p><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="go" rel="external">{{ _('Read the creative brief') }}</a></p>
+ <p><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="go ga_brief-dl" rel="external">{{ _('Read the creative brief') }}</a></p>
</li>
<li class="submit-link {{ user.is_authenticated()|ifeq(True, 'submit') }}">
<h3>{{ _('Submit your flick today') }}</h3>
@@ -146,7 +146,7 @@ <h1 class="section-title">{{ _('2013 Flicks') }}</h1>
</div>
<ul class="info">
- <li><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="button-light dl" rel="external">{{ _('Read the creative brief') }}</a></li>
+ <li><a href="{{ settings.LINK_BRIEF[request.locale] }}" class="button-light dl ga_brief-dl" rel="external">{{ _('Read the creative brief') }}</a></li>
<li><a href="http://mzl.la/XootKF" class="button-light dl" rel="external">{{ _('Download the creative assets') }}</a></li>
<li class="gallery-link"><a href="{{ url('flicks.videos.list') }}" class="button-light go">{{ _('View the gallery of entries') }}</a></li>
</ul>
View
@@ -185,6 +185,9 @@ def _allowed_hosts():
'google_analytics': (
'js/ga.js',
),
+ 'google_analytics_events': (
+ 'js/ga_event-tracking.js',
+ ),
'browserid': (
'browserid/browserid.js',
),

1 comment on commit 2847942

please update po file at the same time when you update template file, or all localized pages will contains english text.
see: https://bugzilla.mozilla.org/show_bug.cgi?id=860204

Please sign in to comment.