зеркало из https://github.com/mozilla/bedrock.git
Merge pull request #2084 from mozilla/bug-1001130-update-homepage-ga-tracking
Update homepage GA tracking. Bug 1001130.
This commit is contained in:
Коммит
c59ccb3725
|
@ -252,7 +252,7 @@
|
||||||
{% endl10n %}
|
{% endl10n %}
|
||||||
|
|
||||||
</ul>
|
</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>
|
</section>
|
||||||
|
|
||||||
{% elif request.locale in ['hu','pt-BR'] %}
|
{% elif request.locale in ['hu','pt-BR'] %}
|
||||||
|
@ -261,7 +261,8 @@
|
||||||
<h2>{{ _('Get involved') }}</h2>
|
<h2>{{ _('Get involved') }}</h2>
|
||||||
<p>
|
<p>
|
||||||
{{_('Help launch Firefox OS in your country.')}}
|
{{_('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>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -281,7 +282,7 @@
|
||||||
<p>
|
<p>
|
||||||
{% trans link_l10n='https://l10n.mozilla.org' %}
|
{% trans link_l10n='https://l10n.mozilla.org' %}
|
||||||
Thanks to our global community, Mozilla products and websites are available in over 70 languages.
|
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 %}
|
{% endtrans %}
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -205,24 +205,18 @@
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Track news clicks
|
// Track news & contribute clicks
|
||||||
$('.extra-news a').on('click', function(e) {
|
$('.extra-news a, .extra-contribute a, .engage a').on('click', function(e) {
|
||||||
e.preventDefault();
|
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 href = this.href;
|
||||||
var callback = function() {
|
var callback = function() {
|
||||||
window.location = href;
|
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
|
// Track Firefox downloads
|
||||||
|
|
Загрузка…
Ссылка в новой задаче