Merge pull request #2084 from mozilla/bug-1001130-update-homepage-ga-tracking

Update homepage GA tracking. Bug 1001130.
This commit is contained in:
Alex Gibson 2014-06-06 18:05:16 +01:00
Родитель 837c92e86a ba04fe98e6
Коммит c59ccb3725
2 изменённых файлов: 10 добавлений и 15 удалений

Просмотреть файл

@ -252,7 +252,7 @@
{% endl10n %}
</ul>
<p class="control"><a href="{{ press_blog_url() }}" class="go">{{ _('See all news') }}</a></p>
<p class="control"><a rel="external" href="{{ press_blog_url() }}" class="go">{{ _('See all news') }}</a></p>
</section>
{% elif request.locale in ['hu','pt-BR'] %}
@ -261,7 +261,8 @@
<h2>{{ _('Get involved') }}</h2>
<p>
{{_('Help launch Firefox OS in your country.')}}
<a href="{{ mobilizer_link }}">{{_('Become a Mobilizer today.')}}</a>
{# Assuming all mobilizer_link's are external. #}
<a rel="external" href="{{ mobilizer_link }}">{{_('Become a Mobilizer today.')}}</a>
</p>
</section>
@ -281,7 +282,7 @@
<p>
{% trans link_l10n='https://l10n.mozilla.org' %}
Thanks to our global community, Mozilla products and websites are available in over 70 languages.
<a href="{{ link_l10n }}">Help translate them into yours</a>.
<a rel="external" href="{{ link_l10n }}">Help translate them into yours</a>.
{% endtrans %}
</p>
</section>

Просмотреть файл

@ -205,24 +205,18 @@
);
});
// Track news clicks
$('.extra-news a').on('click', function(e) {
// Track news & contribute clicks
$('.extra-news a, .extra-contribute a, .engage a').on('click', function(e) {
e.preventDefault();
var href = this.href;
var callback = function() {
window.location = href;
};
gaTrack(['_trackEvent', 'Mozilla in the News Interactions','click', href], callback);
});
// Track contribute clicks
$('.extra-contribute a, .engage a').on('click', function(e) {
e.preventDefault();
var href = this.href;
var callback = function() {
window.location = href;
};
gaTrack(['_trackEvent', 'Get Involved Interactions','clicks', 'Get Involved Button'], callback);
var action = (/external/.test($(this).attr('rel'))) ? 'outbound link' : 'click';
gaTrack(['_trackEvent', 'Homepage Interactions', action, href], callback);
});
// Track Firefox downloads