Interoperability issues: Deeplinking 3!!!

August 8, 2007

I know, after two articles about deeplinking, you were not expecting a third one. Well, me neither!

Thanks to the wonderful effects of research, I happened to find an article of the Blitz Agency Labs website, talking about the “ultimate” deeplinking functionality for Flash: a JavaScript enabling deeplinking, bookmarking AND the use of the ‘back’ button in your browser!

Asual Interactive Solutions, a small Bulgarian agency, provides the script on their website. Blitz used it for the GE Imagination Theater website and the result is just amazing! I noticed it’s not very smooth but I think it’s mainly because some animations between two pages are pretty long.

Now the question is, what about people who don’t have JavaScript enabled? I’m thinking of creating some kind of “alternative browser toolbar” that would reproduce the address bar, the back & forward buttons and that would appear only when you have disabled JavaScript. Or it could be only a couple of buttons that would be called “back”, “forward” and “permalink”. I need to work it out.


Interoperability issues: Deeplinking 2!

August 8, 2007

In my latest post, I talked about the deeplinking functionality and how to implement it. Basically, you just have to add a query variable at the end of the URL. Now the thing is, how can your users add a page to their bookmarks or just copy and paste the URL of the page without clicking the “send to a friend” button?

Well, there is a way. The idea is still the same: change the URL. But this time, don’t use query variables, use named anchors. The idea is that you want the address bar of your browser to display a URL going to the very page you’re viewing now. It is possible to modify a URL thanks to JavaScript (window.location.href = ‘http://www.jujupiter.com/index.php?page=home’;) but if you modify your URL by adding query variables, the browser will reload the page, and thus, reload your Flash animation and interrupt animations, which is the last thing that you want.

You have another way of modifying a URL, thanks to named anchors (http://www.jujupiter.com/index.php#page=home). The advantage with them is that they don’t reload the page when you add them through JavaScript. Now the only thing you have to do when you load a page with this URL, is to analyse the URL, see if there is a ‘#’ symbol, and add everything that is behind it at the end of the URL of your Flash movie when you call it in your HTML code:
<param name=movie value="flash_website.swf?page=home" />

And now your user can bookmark every page of your website, or copy and paste them to a friend, add it to a del.icio.us feed…

Here is an article with beautiful examples:

Deep/Stateful Linking in Flash MX 2004 Applications


Interoperability issues: Flash & statistics

August 2, 2007

Another issue with Flash is that you can’t track what your user checked on your website.

For example, if your user goes to your website, he will click on several links in the navigation. The thing is, these links don’t match with files and, as a result, each new page visualised is not added to your website’s logs and then don’t appear in your statistics.

This issue is not a problem to the user, it’s actually a problem to you because you don’t know what is the most attracting part of your website, the least attracting part of it or whether an article has been read a lot, etc.

Let’s think of some ways to fix this issue:

1. Split your Flash file
You can, if you like, split your Flash file into several Flash files. You could have one main Flash file that loads other Flash file, one for each page and then each file will be notified in your logs. However, according to the statistics tools you use, it’s pretty sure than these Flash files won’t appear in your statistics as the Flash format is not recognized a proper page. Besides, according to the size of the content of your pages, it could be very painful for the user to wait for the page to load and display each time they click on a link.

2. Use Google analytics
Another solution is to use Google analytics. Google analytics is a statistics tool developed by google that enable you to track every page of your website, as well as Flash pages. How does it work? It’s pretty simple. Google analytics provide you with some Javascript code that you have to insert in every HTML page of your website, as well as the one containing your Flash object. Inside your Flash object, you just have to call the JavaScript function they gave you, and pass it the name you want for your Flash page (“about”, “about/people”, etc.). It works very well. The only problem is that some people turn off JavaScript, therefore, you can’t track them. Google analytics also require images and cookies to be enabled. It’s a shame Google analytics doesn’t provide code that doesn’t need these features.

3. Develop your own statistics tool
You can write a function in your Flash file that will call a PHP file that will write in a file or in your database that the user with such IP viewed such page at such time. Then, you can create a page that will compute visits, pageviews, etc. This way, you are sure you will get what you want. But it is quite time consuming and intricate: How do you compute a visit? How do you know where your user come from? How do you know what keyword brought your user to this specific page? The subject is very broad and it will take a lot of time to develop a tool that can answer all your questions.

So?

Well, personally, I would run for the Google analytics solution. Because, first of all, it’s Google, and these guys know what they do. Second, because everything is already done and it’s very simple to implement and very efficient. Then, because someone who has Flash Player probably has JavaScript, images and cookies enabled, don’t you reckon?

No.

I think I’m just too lazy.