Skip to content

Commit

Permalink
Merge pull request mozilla#3537 from alexgibson/bug-1221303-update-pi…
Browse files Browse the repository at this point in the history
…xel-campaign-id

[bug 1221303] Update pixel campaign id's on /firefox/os/2.5/
  • Loading branch information
jpetto committed Nov 11, 2015
2 parents 6a3682e + ba35ffd commit 1199ea1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
10 changes: 5 additions & 5 deletions bedrock/firefox/templates/firefox/os/ver/2.5.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
{% block hero_copy %}
<div class="hero-content">
<h1>{{ _('Experience Firefox OS on your Android device')}}</h1>
<p>{{_('Introducing Firefox OS 2.5 Developer Preview, an experimental app that lets you to use Firefox OS on your Android device.')}}</p>
<p>{{_('Introducing Firefox OS 2.5 Developer Preview, an experimental app that lets you use Firefox OS on your Android device.')}}</p>
<div class="primary-cta">
<a href="https://d2yw7jilxa8093.cloudfront.net/B2GDroid-mozilla-central-nightly-latest.apk" class="cta-button">{{_('Get the Android App')}}</a>
<a href="https://d2yw7jilxa8093.cloudfront.net/B2GDroid-mozilla-central-nightly-latest.apk" class="cta-button" data-id="Mozilla_B2G_Activity_Tag_1">{{_('Get the Android App')}}</a>
</div>
</div>
<div class="hero-image">
Expand Down Expand Up @@ -53,7 +53,7 @@ <h3>{{_('The most control')}}</h3>
<section class="fxos-hub">
<div class="content-wrapper">
<div class="hub-container">
<h2>{{_('Visit the Participation Hub')}}</h2>
<h2>{{_('Visit the Participation Hub')}}</h2>
<p>{{_('Want to make Firefox OS even better? Get all the resources, tools and documentation you need from the Participation Hub.')}}</p>
<p><a class="more" rel="external" href="https://firefoxos.mozilla.community">{{_('Check it out')}}</a></p>
</div>
Expand All @@ -64,7 +64,7 @@ <h2>{{_('Visit the Participation Hub')}}</h2>
</section>
{% endblock %}

{% block fxox_mdn %}
{% block fxox_mdn %}
<section class="fxos-mdn">
<div class="content-wrapper">
<div class="mdn-container">
Expand All @@ -90,7 +90,7 @@ <h2>{{_('Learn more at MDN')}}</h2>
<div class="content-wrapper">
<h2>{{_('Ready to try Firefox OS 2.5 Developer Preview on your Android device?')}}</h2>
<div class="primary-cta">
<a href="https://d2yw7jilxa8093.cloudfront.net/B2GDroid-mozilla-central-nightly-latest.apk" class="cta-button">{{_('Get the Android App')}}</a>
<a href="https://d2yw7jilxa8093.cloudfront.net/B2GDroid-mozilla-central-nightly-latest.apk" class="cta-button" data-id="Mozilla_B2G_Activity_Tag_2">{{_('Get the Android App')}}</a>
<p>{{_('Want the full Firefox OS 2.5 experience?')}} <a href="https://firefoxos.mozilla.community/devices/" class="more" rel="external">{{_('Flash your phone')}}</a></p>
</div>
</div>
Expand Down
27 changes: 15 additions & 12 deletions media/js/firefox/os/firefox-os-2.5.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@
;(function($) {
'use strict';

$('.cta-button').on('click', function(e) {
if (!window._dntEnabled()) {
e.preventDefault();
ftGoalTag14004();
}
});

function ftGoalTag14004(){
function trackClick(e) {
e.preventDefault();
var id = $(e.target).data('id');
ftGoalTag14004(id);
}

function ftGoalTag14004(id){
var ftRand = Math.random() + '';
var num = ftRand * 1000000000000000000;
var ftGoalTagPix14004 = new Image();

ftGoalTagPix14004.src = 'https://servedby.flashtalking.com/spot/2713;14004;1723/?spotName=submit_button&cachebuster=' + num;
ftGoalTagPix14004.src = 'https://servedby.flashtalking.com/spot/8/6247;52161;4669/?spotName=' + id + '&cachebuster=' + num;

setTimeout(ftLoaded14004, 300);
setTimeout(ftLoaded14004, 400);
}

function ftLoaded14004() {
function ftLoaded14004() {
window.location.href = 'https://d2yw7jilxa8093.cloudfront.net/B2GDroid-mozilla-central-nightly-latest.apk';
}
}

if (!window._dntEnabled()) {
$('.cta-button').on('click', trackClick);
}

})(jQuery);

0 comments on commit 1199ea1

Please sign in to comment.