pipwerks: home

pipwerks

Standards-friendy eLearning and Web development (HTML 5 version)

SWFObject and Google Analytics

Just a quick note: I’ve posted two new SWFObject examples: Embedding a SWF then displaying markup to copy, and Wrapping Google Analytics Code in a DomReady event.

I wanted to point out that the code for wrapping Google Analytics code in a domready event is not actually SWFObject-specific; it just happens to be an issue a lot of SWFObject users have complained about over the last couple of years. My example includes a SWF, but the code is usable in any webpage. I highly recommend it (or your own home-brewed variation of it) simply because it moves Google’s <script> element out of your markup and into the <head> where it belongs. Progressive enhancement FTW! :)

Like what you see? Why not share it!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • LinkedIn
  • StumbleUpon
  • Tumblr
  • Twitter

Related posts:

  1. Introducing LearnSWFObject.com
  2. SWFObject.js finds a home on Google servers
  3. Introducing PDFObject
  4. More SWFObject 2.0 examples
  5. SWFObject is officially at 2.0

Want a gravatar? They're easy and free! Just sign up at gravatar.com

Add your two cents!

You can use the following HTML tags in your comment: <a> <abbr> <b> <blockquote> <cite> <code> <em> <i> <q> <strike> <strong> <pre>

The anti-spam code is my LAST NAME, and can be found in the page footer.
Be careful not to misspell it.

I'm currently moderating comments. Please don't submit your comment twice; it will appear as soon as I can approve it.