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

Mark Gillingham markgill at greatbooks.org
Tue Dec 14 18:19:29 CET 2010


Also, I had to turn off xhtml_cleaning or explicitly add <noscript>,
something like the following:
config.xhtml_cleaning = 0
config.tags.noscript = 1

With these changes, I was able to validate the javascript and view test
sections that made sense. However, I'm still not out of the woods. Optimizer
wants to inject variations into the sections (between their section code).
This is NOT happening. All variations look just like the original and I'm
not certain why.

Any ideas out there?
---
Mark



On Mon, Dec 13, 2010 at 4:19 PM, Mark Gillingham <markgill at greatbooks.org>wrote:

> The javascript required HTML comments so that the contents of the
> headerData.10.value has <!-- and --> around it.
>
> headerData.10.value = <!-- Google Website Optimizer Control Script
> javascript with "&" in it goes here.  End of Google Website Optimizer
> Control Script -->
> ---
> Mark
>
>
>
> On Tue, Dec 7, 2010 at 10:04 AM, Mark Gillingham <markgill at greatbooks.org>wrote:
>
>>  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