Fire up the Fox - Marketing to Firefox users

Posted by ottodv on Sun, 06/11/2006 - 13:13Firefox Marketing Ideas

We spend a lot of time here at SFx trying to get people to use Firefox. We add banners and buttons to our site for people to download Firefox. But what's the use of showing those buttons to people who already have Firefox?

It makes sense instead to either offer them something else to download, or offer them a page where they can learn more about Firefox.

Such a page should provide an easy overview of the possibilities, extensions, themes, where to get help, how to get involved, etc... A visitor (presumably an existing Firefox user) may discover new possibilities and this can help entrench Firefox usage.

The last few days I have (with contributions from Ken) put together a page just like that and I am offering Firefox users who visit my most popular page a button that links to this page: Fire up the Fox

I use a bit of JavaScript to select between browsers and choose the ad to show:

var ua = navigator.userAgent.toLowerCase();
if (0<=ua.indexOf('msie')) {
    // Code for downloading Firefox button
} else if (0<=ua.indexOf('firefox')) {
    // Code for Fire up the Fox button
} else {
    // Code for Thunderbird or OpenOffice buttons.
}

This code divides users in 3 groups:

  1. Internet Explorer users are offered a GetFirefox button.
  2. Firefox users are offered a Fire up the Fox button.
  3. Other browsers are offered a Thunderbird or OpenOffice button (since they have already made a browser choice).

I have built this mechanism and the Fire up the Fox page as an example of what is possible, it could grow into an SFx community project if there is more interest for it.

We need to solidify and entrench Firefox usage amongst people who already use it, especially as the browser war is going to get a lot more fierce in the coming years (Microsoft has millions of dollars lined up to market IE7). Extensions, themes and other possibilities that are not available for Internet Explorer will help keep people using Firefox. So let's tell them about it!

Otto - http://www.7is7.com/otto/ 

 


Submitted by Luke Nevaeh on Thu, 05/22/2008 - 02:10.

Nice post. We should make full use of the advantages to  compete against IE7.

Submitted by ottodv on Sun, 01/27/2008 - 18:43.

The Fire up the Fox! project now has its own Project Homepage on the New SFx! Go check it out.

- Otto

Submitted by ottodv on Tue, 06/13/2006 - 20:57.

It is now possible to Digg the page.

Submitted by ottodv on Mon, 06/12/2006 - 22:58.

First of all thank you to everyone who has contributed to the discussion on browser detection.

In the situation we seek here I divided browsers into 3 categories (see the original post), but we have just 2 important restrictions:

  1. we do not want to show Firefox users a GetFirefox button (it's a waste the user already has it)
  2. but we absolutely want to show IE users a GetFirebox button.

This makes it much less stringent, it's not a problem for example if:

  1. a Firefox users gets to see a Thunderbird button, or
  2. an Opera user gets to see a GetFirefox button.
At most these last situations are a sub-optimal use of your advertising space but it is not entirely wasted.

The original detection scheme meets the requirements quite well but does have some of the suboptimal side effects, and as others like Sergio have pointed out there are ways to improve that. Most of it relates to Opera users, and I have done a quick count on yesterdays log, it contained 455 pageviews made by Opera users, 169 of those had user agent strings which included the text "MSIE", in other words, yesterday 37% of Opera users would have been classified as IE users by the original script. That is quite a lot in my opinion and warrants a correction of the script.

It was mentioned correctly by factboy that Bon Echo and Minefield would not be classifief properly, so they would fall in the other browsers category with the original script. Out 47,000 pageviews just 19 were made with Bon Echo and none with Minefield. OK, it's not that much, but it would be nice to treat them as Firefox users. However people who use these browsers are advanced users who do not need me to tell them what they can do with their browser nor where they can download Thunderbird or OpenOffice. It is therefor questionable whether it warrants an extra check at this time. However for the sake of trying to make a better script I will include it.

With these changes the script now looks like this: 

var ua = navigator.userAgent.toLowerCase();
if (
    0<=ua.indexOf('msie') &&
    0>ua.indexOf('opera')
) {
    // Show GetFirefox Button
} else if (
    0<=ua.indexOf('firefox') ||
    0<=ua.indexOf('bonecho') ||
    0<=ua.indexOf('minefield')
) {
    // Show button for Fire up the Fox page
} else {
    // Show button for Thunderbird or OpenOffice
}

Obviously if you are going to use a script like this, you should also provide an alternative for those who turn off JavaScript by placing code for a GetFirefox button between <noscript> tags. Another good way to do the same thing is to follow the example provided by Kelson, using DOM and JavaScript to replace a banner or button (this method degrades better when JavaScript is turned off by other means than in the browser itself). And finally if you have the possibility to use server side scripting (such as PHP) that is actually the most foolproof way to get it right.

However let's not let the browser detection discussion cloud the purpose of this whole excercise, which is to offer Firefox users something else than a button to download Firefox. I posted my method as an example and to inspire other people to do something similar. One part consists of detecting the browser, but the other part is to provide a web page with a good overview of the possibilities. That part may be even more important and I hope to have built something good for that.

Anyone can feel free to send Firefox users to the Fire up the Fox page if they want, or build their own page or at least show them a Thunderbird, OpenOffice or SpreadFirefox button as showing them a button to download Firefox is a waste (except maybe for the purpose of upgrading pre-1.5 versions).

Otto - Fire up the Fox

Submitted by factboy818181 on Tue, 06/13/2006 - 03:42.

There we go, Otto!  A pretty decent Firefox page with a user-agent detector that works.  :D

 Anyways, I'd like to nominate AdBlock Plus and Noscript for the extensions list.
 

Submitted by Kelson on Mon, 06/12/2006 - 17:52.

Feel free to adapt my DOM-based JS code for this.  The idea there is to have a default banner defined in plain HTML and use JavaScript to replace it based on the detected browser.  The big advantage of this over the document.write + noscript method is that it also works with XHTML.

--

Can Firefox users and Opera fans agree on anything?
The Alternative Browser Alliance

Submitted by Ferk on Mon, 06/12/2006 - 11:54.

 well.. I don't know too much about javascript and don't know what I'm doing wrong.. but it just doesn't show a thing

I wrote this on my blog:
 


 <script type="text/javascript" language="Javascript"> <!--
    var ua = navigator.userAgent.toLowerCase();
    if (0<=ua.indexOf('msie')) {
  document.write("<a href="http://www.mozilla-europe.org/es/products/firefox/" border=0><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Adoptfirefox-es.jpg/300px-Adoptfirefox-es.jpg"></a>");

} else if (0<=ua.indexOf('firefox')) {

  document.write("<a href="http://www.7is7.com/software/firefox/fire_up_the_fox.html"
border=0><img
src="http://www.mouserunner.com/images/Fire_Up_TheFox_180x60.png"></a>");
    } else {
  document.write("<a href="http://www.jabberes.org/introduccion"><img border="0" alt="Jabber, la mensajería instantanea LIBRE!" title="JabberES" src="http://www.jabberes.org/files/imagenes/imab/180-60-m.png"/></a><br>pasate a Jabber");
    }
 --> </script>


 where is the error? :S
 

Submitted by ottodv on Mon, 06/12/2006 - 16:39.

There are two quotes: " and '. Don't use the same to quote the text as you do inside the text. For example your first document.write could look like this:

document.write('<a
href="http://www.mozilla-europe.org/es/products/firefox/"
border=0><img
src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Adoptfirefox-es.jpg/300px-Adoptfirefox-es.jpg"></a>');

Ken makes a good point about hosting your own images. The place you deeplink them from may change the location without notice which will make your site display missing images.

Otto - Firefox Utilities

Submitted by Ken Saunders on Mon, 06/12/2006 - 13:18.

Just a suggestion, you really should start saving images and upload them.
Hot linking is a very bad practice and it eats up the bandwidth of others.
You can use a free pic hosting service such as Flickr or Image Shack and they’ll provide you with an image URL that you can use, and they actually don’t mind hot linking.
Just right click on an image and select “save as” and then upload it to the pic hosting site of your choice.


Mouse Runner

Submitted by sergio_br on Mon, 06/12/2006 - 01:22.

Using that property (userAgent) can lead to mistakes because both Firefox (with UserAgentSwitcher) and Opera can "pass themselves" as Internet Explorer.

One property that really distinguishes Mozilla browsers is the "product" property in navigator object (navigator.product is 'Gecko').

And what really distinguishes the dumb Opera is the word Opera in the userAgent property even when it pretends it is IE...

If a browser doesn't have navigator.product property (null) and the Opera word isn't in the userAgent, but MSIE, you have a bigger chance to be facing a GE"SWINE" Internet Exploder...

Sorry for this comment, tried to help, and there are still other ways to separate IE from other browsers...

Submitted by ottodv on Mon, 06/12/2006 - 05:33.

I have always selected this way because someone who pretends to be Internet Explorer actually wants to see things the way Internet Explorer does.

However in this case there is something to say for the approach you suggest. Though note that "gecko" would also catch Safari, Mozilla and Netscape users, which I don't want to catch. While the "opera" tag would catch more Opera users, but not all. So it is a bit more complicated, but I'll look into it further.

Otto - Firefox Utilities

Submitted by Kelson on Mon, 06/12/2006 - 17:40.

When doing plain string checks, I usually do them in this order:

  1. "Opera" - since it has built-in masquerading, and versions through 8.5 masquerade as IE by default. (Starting with version 9, the default will be no masquerading except on sites known to need it, though the user can still turn it on.)  Opera always includes its name in its UA unless it's completely masking its identity, which doesn't happen by default (in any version) unless the website is on a small list of sites known to discriminate against Opera.
  2. "KHTML" since Safari & Konqueror also include "Gecko" in their UA.
  3. "Gecko" at this point should only catch actual Gecko browsers.
  4. "MSIE" should now catch only Internet Explorer and its alternate shells.
Actually, I often check for robot-related keywords between #3 and #4, since many pretend to be IE, but that's probably not relevant for purposes of which banner to show.  I wrote this up in more detail last year on my blog, if anyone's interested.

--

Can Firefox users and Opera fans agree on anything?
The Alternative Browser Alliance

Submitted by sergio_br on Tue, 06/13/2006 - 02:20.

You said some use Gecko in their UA:

I said to catch Gecko in the PRODUCT property, not userAgent property... Do they have the PRODUCT property as Mozilla ? (I don't know, please confirm it to me...)

The autor said that if some browser pretends it is IE the person wants to see the same IE content, but unfortunatelly, he WILL NOT see because some things will NOT WORK magically only because the browser changed the userAgent property. Example: IFRAMES designMode...

Submitted by ottodv on Tue, 06/13/2006 - 07:41.

My comment was regarding content not browser capabilities. Remember we are just selecting content (a banner to show) based on the browser someone has (it's going to work regardless).

To select for the purpose of determining capabilities, I favor an entirely different approach, which is to determine if a browser is capable of something before using that feature. But that is a different topic entirely.

Otto - Fire up the Fox

Submitted by sergio_br on Tue, 06/13/2006 - 15:27.

Exactly.

If you use msie in the userAgent property you have the possibility of be showing the Firefox banner to a Firefox user who uses UserAgentSwitcher extension.  

Submitted by Ken Saunders on Sun, 06/11/2006 - 14:15.

Thanks for the mention Otto, but my contributions are minimal, you’re the brains behind it all.
What I like most about Fire up the Fox (besides the name), is that it adds more Firefox content to the Web, and if anyone reads my ramblings, you know that I’m an advocate for more Fx content being put on the Web so more people will find it in search engine results equaling more exposure for Firefox.
But the focus of your Fire up the Fox is on current and new Firefox user’s which is great because there really aren’t a whole lot of offerings for this type of content in one place.
Nicely done and I fully support your project.
P.S. Nice button ;)



Submitted by factboy818181 on Mon, 06/12/2006 - 14:27.

Otto, if your host has PHP, chat with me or contact me via e-mail - I'll give you some of the source for NAlerter.

 PHP is more reliable than JS browser detecting in my opinion - people can disable JS and it might be easier to fool than PHP.
 

Submitted by ottodv on Mon, 06/12/2006 - 16:54.

Viewing the particular page I happen to use this code on without JavaScript would be rather pointless (it's a Countdown Clock). But in general you are absolutely right that PHP is better for this particular task because it can't be disabled by the client.

Otto - Firefox Utilities

Submitted by factboy818181 on Mon, 06/12/2006 - 18:26.

Yeah, that's the reason why I try to avoid JS most of the time if possible (or include a noscript message, which will land on the public version of my site in late June with any luck).

IE is one of the easier browsers to detect, you just stristr for MSIE and the version number and make sure that Opera isn't in the UA string.

 Oh, by the way Otto, your code will treat Bon Echo and Minefield users as non-Firefox browsers.