2019 |
7 |
17 |
アクセスIP の Google Analytics 連携設定、Google Analytics にてアクセス数が二重カウントされるため削除
変更前 |
<script type="text/javascript">
<!--
window.onload = function() {
document.body.oncontextmenu = function () {
return false;
}
}
// -->
</script><!-- アクセスIP to Google Analytics ここから --><script
type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-106464651-1']);
_gaq.push(['_setCustomVar', 1 , 'IPアドレス' , '<?php echo $_SERVER['PHP_SELF'],
" ", $_SERVER['REMOTE_ADDR']; ?>' , 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.parentNode.insertBefore(ga,
s);
})();
</script><!-- アクセスIP to Google Analytics ここまで --> |
変更後 |
<script type="text/javascript">
<!--
window.onload = function() {
document.body.oncontextmenu = function () {
return false;
}
}
// -->
</script> |
|