add_to_head("
-- Your Google Code --
");
Quote
PolarFox wrote:
includes/header_includes.php will be better.
For all pages and without any panel.
And with this code of course :)
[b]add_to_head("[/b]<!-- Google Analytics START -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-16649074-1']);
_gaq.push(['_trackPageview']);
</script>
<script type="text/javascript">
document.onclick = function(event) {
event = event || window.event;
var target = event.target || event.srcElement,
targetElement = target.tagName.toLowerCase();
if (targetElement == "a") {
var href = target.getAttribute("href"),
urlHost = document.domain.replace(/^www\./i,"");
var urlPattern = "^(?:https?:)?\/\/(?:(?:www)\.)?" + urlHost + "\/?";
eventCheck(href,urlPattern);
}
function eventCheck(href,urlPattern){
if ((href.match(/^https?\:/i)) && (!href.match(urlPattern))){
if (href.match(/^.*\.(pdf|jpg|png|gif|zip|mp3|txt|doc|rar|js|py)$/i)) {
_gaq.push(["_trackPageview","/download/" + href]);
} else {
_gaq.push(["_trackPageview","/exitlink/" + href]);
}
} else if (href.match(/^mailto\:/i)) {
_gaq.push(["_trackPageview","/mailto/" + href.substr(7)]);
} else if (href.match(/^.*\.(pdf|jpg|png|gif|zip|mp3|txt|doc|rar|js|py)$/i)) {
_gaq.push(["_trackPageview","/download/" + href]);
}
}
};
</script>
<script type="text/javascript">
(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';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
</script>
<!-- Google Analytics END -->[b]");[/b]
add_to_head("
<script type='text/javascript' src='".BASEDIR."google_code.js'></script>
");
add_to_head("
script with some " replaced by '
");
onClick="_gaq.push(['_trackPageview', '/mal/formular/kontaktaoss']);"
Category Forum
System Administration - 8Labels
None yet
Statistics
5 participants
Notifications
You are not receiving notifications from this thread.
Related Questions