Thursday, May 29, 2008

Flash Analytics, Deep Linking, and SEO for AS3

I recently had to do some research for a potential client about how Flash can address Analytics, Deep linking, and Search Engine Optimization (SEO).

Below is what I have found so far. Please send your comments/suggestions on alternative/better ways. Would love some feedback.

I. Flash Analytics:
Not only does Google support Flash with its current analytic scripts, but it actually adds some flexibility that typical html sites do not have. In order for you to get it to work you just need to add the Google javascript code before the "body" end tag just like any other HTML page. When the user changes pages in Flash we can send a call to the javascript and pass in a string representing the "page" that is being loaded even though the only thing that is changing is the Flash content... the page itself will not be reloaded. The exciting part about this is that we can make this call whenever we want, we do not have to limit ourselves to the idea of "pages" in Flash. For example, we could make the call when the user clicks on a video or even when the video is done playing.

References:
Google Analytics + Flash:
http://www.google.com/support/googleanalytics/bin/answer.py?answer=55520&topic=11006

Tutorial on Google Analytics + Flash w/
Improvements:
http://blog.six4rty.ch/tutorials/flash-cs3-google-analytics-flash-content/


II. Flash Deep Linking:
Deep linking basically means that if I am at "www.domain.com/index.html" and want to view the contact page I could just type "www.domain.com/contacts/" in the address bar. I could then save this page as a favorite so I could come back directly to it later.

In a typical Flash site you can not do this, you would have to go to the index and click the button for contacts. However, using swfAddress (open source Flash tool) we can enable deep linking on the Flash site. The scripts update the address bar as you navigate the site. This means that as the user goes to the contact page the address bar will update to something like this: "www.domain.com/#contacts". The user can then save this page as a favorite and when they come back the Flash will read the #contacts and go directly to the contact page.

References
:
SWFAddress:
http://www.asual.com/swfaddress/

Blitz Example for GE Imagination Theater:
http://labs.blitzagency.com/?p=51

Helio Example:
http://www.helio.com/#homepage


III. Flash SEO:
The Flash content itself is not Optimized for search engines. However, it is a recommended practice to include alternate content for browsers/users that can not view Flash/Javascript sites. Within this designated area we can include a general representation of what is held within the Flash site. Google's spiders will read the non-Flash content while users will only see the Flash content.

References:
How to SEO Flash
http://www.hochmanconsultants.com/articles/seo-friendly-flash.shtml

18 comments:

zedia.net said...

You can actually combine your first two points by using SWFAddress. When you go to a deeplinked page, SWFAddress will notify Google Analytics automatically if you included the Google Analytics Javascript code in your HTML. No extra work required.

Ickydime said...

zedia, thanks for the tip! I am still at the research phase so I haven't tried implementing anything with SWFAddress. Will definitely keep that in mind.

I did start to test the Google Analytics using the tutorial link I provided... However, in the tutorial they suggested using sendToURL() to access the google analytic scripts. Flash will block that call for security reasons. Instead I have found using: ExternalInterface.call("pageTracker._trackPageview", crumb); works just fine.

Al said...

Have a look at the Gaia framework, it does everything you want and automates much of the process: http://www.gaiaflashframework.com/

Sam said...

I am interested to know how the tools mentioned here could apply to Flex applications.

Ickydime said...

@al, definitely an interesting framework. After watching the demo I think I can learn quite a bit by looking at how they did it, but feel I would pass on actually using it because it seemed restrictive. My main beef is that I dont like the idea of having a different swf/fla for each section of the site. Actually, I don't like the idea of having to have sections in a site. Seemed way to similar to HTML/Frames of the old days. Would much rather have different elements that I can pull from to keep the site more dynamic and flowing. But I need to research more than just that demo video. I might be jumping to conclusions...

Ickydime said...

@sam, I must be honest, I am not experienced with Flex applications by definition. I use Flex to program my Flash applications and libraries... but I still design and compile in the Flash IDE.

However, I would imagine you could use very similar techniques regardless of whether you published from Flex or from Flash. Every topic mentioned only required ActionScript, JavaScript, and HTML. All of which can be present in Flex components.

Are you seeing any roadblocks that I am overlooking?

Mike said...

Hi,

let's spread the world with Fl(ash) SEO !

If I may suggest, seems you could make some improvement to Helio 'cause the navigation process sometimes freezes (try the Back/Next buttons several times..)

In my last article about the making-of an IoC ActionScript RIA (which supports deeplinking management), I have a word about SWFAddress and SEO)

HellFest “Open Air Edition”, part I – An Extreme modular (IoC/ PixIoC) ActionScript RIA, http://www.deja-vue.net/blog/2008/05/28/hellfest-open-air-edition-part-i-–-an-extreme-modular-ioc-pixioc-actionscript-ria/

You maybe find some great SEO techniques resources at the end of the article.

Mike.

Guilherme Viebig said...

SWFAddress is a bad idea. You have different addresses but in the end just One big page.

Flash will never be perfect on SEO aspect. I believe I did the most complete SEO integration ever with a flash site.

What I did:

Unique urls, meta keywords/description without reloading pages

State-of-the-art Analytics page/event handling

W3C/WAI standards strict

What I did miss(because its impossible without)

Change the url on address bar

Compatibility with ie/ff social bookmarking web bars(since they use the current url)

All that shipped with a xml/flashvars driven content management system.

If anyone is interested, let me know viebig at gmail dot com

Daniel Goulding said...

I believe a good approach might be something like:
+ build a traditional html page based site
+ use links as normal (e.g. /contact.htm)
+ use a scripting framework such as code igniter to translate these urls into # urls: /contact.htm -> /#contact
+ wrap every page's content in containing div.
+ use swfobject to hide the content and display flash content
+ feed the swf the deep link info, dictated by the url

This way you can get the site to be SEO friendly - because as far as the Search Engine's concerned, it's viewing a normal html site. You are also able to have a seemless deep linked flash site. A bit of work, but work it. Your html doesn't have to be styled - no one with flash will see this. Just make sure the markup is of high quality because this will help your site rank better.

Anonymous said...

Can this work with AS2 ?

Ickydime said...

Yes, there is an AS2 version: http://www.asual.com/swfaddress/

adrian said...

Regarding SWFAddress, is there an AS3 version? Funny I know, but couldn't find it in their examples. All of them are AS2.

Ickydime said...

Download the zip. It has versions for 1, 2, and 3 all included in the same file.

restaurant seo said...

Most SEO specialists I've talked to usually suggest against using flash or too much javascripts. Checking this out might change my mind though.

New Digital Agency said...

Well, we can make our websites attractive by implementing flash in the site. The customers will be more attracted towards the website if it has interesting and updated applications.

Kai Lewis said...

With all those approaches used in SEO, is it still doubtful for others how successful it is in its industry? I mean everyone's in front of their computers already and everything is in the grasp of their fingertips.

Daryll Fray said...

I think it would also work if you added other elements to flash; or, considering today's situation, maybe just abandon flash entirely. Most sites tend to have trouble with flash's slow loading times (like for videos or a contest app they just added), so they prefer to switch up to, say, JQuery or similar sets.

jorg gray said...

Dallas Affordable SEO Services. We are offering Internet Marketing Services at affordable price. Improve your website visibilty in SERP.