[uf-discuss] Javascript Support

Will Becker will at qubitdigital.com
Sun Aug 5 06:14:58 PDT 2012


Hi,

I'm a developer of OpenTag - a JavaScript snippet you add to your
webpage, which then in turn loads other scripts. Companies can use
this to deploy analytics and fire off affiliate/retargeting scripts to
tell referrers that something has been bought. You can have a poke
around here: www.opentag.qubitproducts.com - feel free to set up an
account - it's free(mium).

The scripts that load via our tool need to know a lot about various
parts of the web pages that are accessed, eg what and how much has
been purchased, so you can, for example, figure out which marketing
channel is driving you the most valuable traffic so you can throw more
money at them.

This is where the whole microformats come in. Previously, to implement
these 3rd party scripts, people would scrape the data off their pages
to populate the right values using document.getElementById, etc, or
just hard code them on the server side to the scripts. The first
solution isn't great because if the pages changes then you have to
rewrite your scripts, the second solution only solves the problem for
a single script, not all of them.

The problems with microformats is that it only marks up what is
already on the page. If the data isn't there but is necessary then
what? The other problem is that it requires web devs to actually go in
and alter their website, which falls foul of the, "if it changes and I
don't remember about microformats, then everything stops working"
issue.

I'm totally behind the idea of microformats, and it would be great if
these companies would go in and do all this, but it's a big ask (some
companies can be slow to move, other companies sites are held together
with bandaids and they really don't want to change much). Instead,
we've got a simpler solution, which makes it easier to put semantic
markup on their site, but doesn't mean they need to go through and
markup the main UI of their site.

We call our solution universal variables, which we are using as an
open standard to allow people to markup their own pages by writing a
single javascript variable to their page. Doco is here:
https://github.com/QubitProducts/UniversalVariable and you can see it
in action here:
http://www.superdry.com/mens/fragrance/details/34825/steel-cologne---40ml.
This is similar to how Adobe's Omniture uses variables, but is in a
much neater format (for a discussion of omniture varibles see
http://omnitureconsultant.com/2008/01/27/omniture-tutorial-evars-custom-events-sprops/
)

We have a bunch of sites using this now. It is really easy to
implement for these people, especially for people on standard CMSes -
all they need to do is import a plugin (eg:
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/13932/
) and you have it on your site.

What I would like to discuss is how to best integrate this with
microformats. I see you are talking about using a parsed JSON approach
in v2: http://microformats.org/wiki/microformats-2, but this looks
like it is still in preliminary stages.

Given that someone has implemented a universal variable spec, would it
be useful for us to provide a script that dynamically adds meta tags
in the head containing the relevant data (for example like what is
being done here -
http://www.guess.eu/Guess/IT/Donna/Borse/Satchel/Mavis~Small~Satchel/HWNE3453050-BLA
)? The problem I see here is the data is very flat - if you have a
shopping basket that contains several items all of which have a title
and price, how would you represent that using the meta method?

Is it a problem that there is the data in javascript and not in HTML?
It does mean that you cannot ignore the javascript in the page.

On the other hand I can see that a well marked up site using
microformats would be able to recreate a universal variable object
very easily. Does this position universal
variables/javascript-variables-in-general as some secondary stage?
With microformats you can get to universal variables, so you can use
scripts that use the universal variable object, but you cannot get to
microformats from a universal variable. Is this a flaw in microformats
or a necessity to be part of semantic HTML?

Have you had this kind of discussion before? I would love to be able
to find a way to have these data formats work together.

--
Will Becker
Software Engineer
QuBit

http://www.qubitproducts.com/


More information about the microformats-discuss mailing list