このガイドに従って、Google アナリティクスで管理トラフィックをフィルタリングします
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Excluding traffic by Cookie Content</title>
<meta name=.robots. content=.noindex. />
<!-- Google Analytics Code -->
<script type="text/javascript">// <![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); //use real profile ID here
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
(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.parentNode.insertBefore(ga, s);
})();
// ]]></script>
<!-- Google Analytics Code -->
</head>
<body onLoad="javascript:pageTracker._setVar('filter');">
<h1>Excluding traffic by Cookie Content</h1>
<p>This page will set a cookie in your browser that will help Google Analytics filter the traffic that comes from your computer when using this browser.</p>
<p>Once you have this setup, don't forget to set a filter in Google Analytics.</p>
<p>You will need to visit this page only once.</p>
<p>However, if you clear your browser cookies, reinstall the browser or operating system, make sure that you revisit this page, so the cookie will be set again.</p>
</body>
</html>
エラーが発生します:pageTracker is not defined
Firebugで。pageTracker エラーが発生しないバリエーションを一緒にハックしましたが、これを正しく行っているかどうかはわかりません。
<html>
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);//use real profile ID here
_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.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXXX-X");//use real profile ID here
pageTracker._trackPageview();
pageTracker._setVar('founders');
} catch(err) {}
</script>
</head>
</html>
私が上に持っているものは正しいですか?