[TYPO3-english] Typo3 TV and Google Web Optimizer setup

Mark Gillingham markgill at greatbooks.org
Tue Dec 7 17:04:56 CET 2010


 I've just about gotten Optimizer working in my TV with one exception. Since
I could not find information in this forum on this topic, I'll review what
I've done.

 You can *create* multivariate sections by putting HTML elements around a
content element that you want to study.

The HTML element before the content element would be like this:
<script>utmx_section("Section A")</script>

The HTML element after the content element would be like this:
** </noscript>

The general code that goes before the </body> tag can be added in
TypoScript. Add and extenion template to the page you want to study and the
page that you are pointing to from that page. It would look similar to this:

page.wrap (
| <!-- Google Website Optimizer Tracking Script -->
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-xxxxx-1");
gwoTracker._trackPageview("/xxxxx/test");
}catch(err){}</script>
<!-- End of Google Website Optimizer Tracking Script -->
)

You also need to add code in the <head> of your experimental page. This
might be done by editing your TV template and remapping or by TypoScript.
However, I've not been able to get this to work because this code has "&" in
it and my *Typo3* is transcoding them to "&amp;".

I'm still looking for a solution to this.

What I'm trying is the following:


page {
  headerData.10 = TEXT
  headerData.10.stdWrap.htmlSpecialChars = 0
  headerData.10.value = <!-- Google Website Optimizer Control Script -->
javascript with "&" in it goes here. <!-- End of Google Website Optimizer
Control Script -->

  20 = USER
  20.userFunc = tx_templavoila_pi1->main_page
}

I get a result that includes &amp; rather than simply & as in the following
js snippit:

'/siteopt.js?v=1&amp;utmxkey='


I've tried values of 0 and 1 for htmSpecialChars.


---
Mark


More information about the TYPO3-english mailing list