[TYPO3-english] How and where to add "Google's Analytic code"?

Ronald Wiplinger (Lists) ronald_lists at elmit.com
Mon Dec 1 11:18:09 CET 2008


Peter Russ wrote:
> --- Original Nachricht ---
> Absender:   Ronald Wiplinger (Lists)
> Datum:       01.12.2008 07:15:
>   
>> It says you should add this js to each page, how can I do that?
>>
>> bye
>>
>> Ronald
>>     
>
> Wouldn't add an extensions for every peanuts:
> 1) Solution:
> Place a marker for code the in your template and add all required stuff 
> there. Provide the marker code in Typoscript
>
> 2) 100% Typoscript:
> Add all you need at the end of your Typoscript, e.g.
> page.10000=HTML
> page.10000 {
> #everything that is required for google
> }
>
> Pretty straight.
>
> Peter.
>
>   


Thanks Peter,

but it did not work. Maybe I did something wrong.
I opened Template - Template of the root page. Opened SETTUP and added
at the end:

# Google Analytics:
page.10000=HTML
page.10000 {
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5313313-1");
pageTracker._trackPageview();
} catch(err) {}</script>
     
}

Then I checked at Google web site for tracking status and it says:
Tracking Not Installed (Last checked: Dec 1, 2008 2:09:53 AM Please wait
one minute before checking again. )
The Google Analytics tracking code has not been detected on your
website's home page. For Analytics to function, you or your web
administrator must add the code to each page of your website.


What do I miss?

bye

Ronald




More information about the TYPO3-english mailing list