may/lispweb — Issue #5: Baked in A/B (requires a third-party web analytics provider)
Author: may
Created: 2011-11-20 02:08:30+00:00
State: open

Spec:
(a "commentary -- the first case" "html/js/css/lispweb code" "tracking code override")
(b "the second case, with commentary" "html/js/css/lispweb code" "tracking code override")
(c "some other case, but enough talking!" "html/js/css/lispweb code" "tracking code override")
...

Configuration:
(using macros?)
(constant a-stat-code "external web analyitics js code/tag identifier here")
(constant b-stat-code "external web analyitics js code/tag identifier here")
...

Example:
Say, in the sidebar of a site:
(a "let's try this with no ads" "")
(b "but I like making money" "")

How it works:
Presupposing (a) and (b) calls (with appropriate code/configuration) in various parts of the site, all of this translates to javascript if/switch statements when served up. Then, some random variable (I assume JS has a random function) will determine -- on page load -- if we will execute case a or case b (or case c, or ...). Pretty simple, I think.