Discussion:
Google Content Experiments & wp
David Ernst
2013-08-28 15:44:17 UTC
Permalink
Hey pals,

Does anyone here know if it's possible to use Google Content
Experiments<https://support.google.com/analytics/answer/1745147?hl=en&topic=1745207>to
test variations that apply site-wide? For example, running a test on
different versions of a theme's header.php.

Thanks,

David
Dobri
2013-08-28 15:53:19 UTC
Permalink
Just a quick search yielded this:

http://wordpress.org/plugins/google-content-experiments/

Maybe you can give it a try?

If not, use PHP to get the google experiment cookie that's set in the javascript code for the experiment to decide which header to show. If I'm not mistaken, that's how google stores experiment data - cookies created with javascript (which I think you can access with php - http://davidwalsh.name/php-cookies)

P.S. if you're going to do business with cookies (no pun intended), you should also give this a read: http://kb.iu.edu/data/ajfi.html It helps with figuring out which cookie is the right one

Good Luck!

~Dobri
Post by David Ernst
Hey pals,
Does anyone here know if it's possible to use Google Content
Experiments<https://support.google.com/analytics/answer/1745147?hl=en&topic=1745207>to
test variations that apply site-wide? For example, running a test on
different versions of a theme's header.php.
Thanks,
David
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
David Ernst
2013-08-28 16:23:30 UTC
Permalink
Thanks for the speedy response, Dobri!

My cursory review of the plugin suggested it only worked for variations to
pages / posts. Which is all fine and good for most needs! It's just that in
this specific case I'm looking to test variations of site-wide elements.
I'll be more specific about the scope if that paints a clearer picture:


This e-commerce site I'm working on is considering adding a live-chat
module. I'm in favor of it, personally. But other parties are hesitant...
Being an early-stage startup with too much to do and not enough manpower,
there are concerns that it will tie up too many resources to keep an
operator on our end. So I suggested we run a Content Experiment on just
small percentage of visitors, keeping it limited at first, to explicitly
measure conversion shifts. That way we can put a specific dollar value on
this single module, independent of other circumstances like changes in
marketing efforts, site-content, etc. This module would probably load from
footer.php.


So thank you for the suggestion to investigate Analytics' cookies! :-) I
suspect that might work better than using URLs variations-- I was thinking
of passing GET parameters, but saw some issues.

Much appreciated,

David
Daniel Dvorkin
2013-08-28 20:37:46 UTC
Permalink
An (convoluted but cool) approach I used a while back:

1) Have two (or more) child themes of your main theme with the variations
you want.
2) Hook somewhere early (like parse_request) and check if the url has some
experiment data. Set a cookie for the user with the version he got so you
keep serving the same version to that user. Of course first check for this
same cookie, if the user already have it just ignore the experiment ID vars.
3) Filter both the 'stylesheet' and 'template' vars (example
https://gist.github.com/MZAWeb/6235272) and set them to the path of the
corresponding child theme (or the parent theme if it's not coming from an
experiment).

Then you can use that same cookie value on your checkout to measure
conversions for each.





---------------------
Daniel Dvorkin
Móvil: +54 (0261) 15-315-2244
Skype: mzaweb
http://mzaweb.com
Post by David Ernst
Thanks for the speedy response, Dobri!
My cursory review of the plugin suggested it only worked for variations to
pages / posts. Which is all fine and good for most needs! It's just that in
this specific case I'm looking to test variations of site-wide elements.
This e-commerce site I'm working on is considering adding a live-chat
module. I'm in favor of it, personally. But other parties are hesitant...
Being an early-stage startup with too much to do and not enough manpower,
there are concerns that it will tie up too many resources to keep an
operator on our end. So I suggested we run a Content Experiment on just
small percentage of visitors, keeping it limited at first, to explicitly
measure conversion shifts. That way we can put a specific dollar value on
this single module, independent of other circumstances like changes in
marketing efforts, site-content, etc. This module would probably load from
footer.php.
So thank you for the suggestion to investigate Analytics' cookies! :-) I
suspect that might work better than using URLs variations-- I was thinking
of passing GET parameters, but saw some issues.
Much appreciated,
David
_______________________________________________
wp-hackers mailing list
http://lists.automattic.com/mailman/listinfo/wp-hackers
Jeremy Clarke
2013-09-27 18:26:46 UTC
Permalink
Post by David Ernst
Does anyone here know if it's possible to use Google Content
Experiments<
https://support.google.com/analytics/answer/1745147?hl=en&topic=1745207>to
test variations that apply site-wide? For example, running a test on
different versions of a theme's header.php.
I'm not sure what you were hoping to get from the Content Experiments
system, but have you considered using GA Custom Variables and/or Events to
track the effect of having the chat box? If you already have GA set up for
the site, you just need to drop a few lines of JS into the header to set
which version you're using (i.e. with chatbox or without) , then in GA you
can generate reports that compare the two values and the end results.

https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables


I opted for that setup because it lets me keep most of the framework for
defining tests inside my WP plugins/themes rather than stored inside GA
(though obviously the data is still stuck there).
--
Jeremy Clarke • jeremyclarke.org
Code and Design • globalvoicesonline.org
Loading...