WebSite X5Help Center

 
Reinhard K.
Reinhard K.
User

Insert Html-code In <head> Tag  en

Автор: Reinhard K.
Просмотрено 3648, Подписчики 2, Размещенный 68  

inserting HTTP-Code:

For Google tracking, i have to insert into each website in the head-Area a script. How can i do this.

my example,inserting before the closing </head> tag :

<script type="text/javascript">

  var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-123456787-1']);   _gaq.push(['_trackPageview']);

  (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s[removed].insertBefore(ga, s);   })();

</script>

Размещено
3 Ответы - 3 Полезно - 1 Корректно
Incomedia
Mirko Nosenzo
Incomedia

You can set it into the first step, General Settings in the tab Expert.

You will find a field named "Enter code to customize your website HEAD".

Читать больше
Размещено От Mirko Nosenzo
Cheeky Man
Cheeky Man
User

Wink

Becareful with the analytics because there are two versions now with different codes!

They are classic and asynchronous methods..... The classic goes into the body before the last body tag. And the asynchronous method goes into the head. This last method is prefered as it loads faster and does not conflict with other scripts!!

Frank Cool

Читать больше
Размещено От Cheeky Man
Incomedia
Mirko Nosenzo
Incomedia

The code specified is the asynchronous version, you can paste it into the HEAD section.

Читать больше
Размещено От Mirko Nosenzo