MT4の<MTIF>活用法、個別ページのアクセスのアシアトを追うアシアトログにMTタグを使いフッターに自動埋め込み
アクセス解析ソフトの中には個別ページのアシアトを追うことができるものもある。そのひとつがアシアトログ。アシアトログはフリーソフトで、ver2以降は文字化けも少なく、機能も豊富なのでおすすめ。
ただし、アシアトログを設定するにはすべてのページに特定できる独自の名前を入れたタグを埋め込む必要がある。この手間がかかるため敬遠する人も多かった。しかしこの面倒な作業もMT4(ムーバブルタイプ)ならフッダに埋め込むだけでOK。MT4の<MTIF>を使えばすべてのページに簡単にアシアトログの個別タグが設置できる。
▼ここからフッターモジュールのタグに埋め込むアシアトログのタグの例
設定はアシアトログのシステムが公開するブログのURL(MTタグでは<$MTBlogURL$>になる)の「cgi-bin/access」とする。
<!--アシアトログのタグここから-->
<img src="<$MTBlogURL$>/count/dayx.cgi?gif" alt="count" width="1" />
<mt:If name="entry_template">
<script type="text/javascript">
<!--
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTEntryPermalink$>&img=1&scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&ref=", escape(parent.document.referrer), "' border=0 width=1 height=1>");
//-->
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTEntryPermalink$>&img=1&ref=noScript" alt="access" width="1" />
</noscript>
<mt:Else>
<mt:If name="Category_archive">
<script type="text/javascript">
<!--
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTCategoryArchiveLink$>&img=1&scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&ref=", escape(parent.document.referrer), "' border=0 width=1 height=1>");
//-->
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTCategoryArchiveLink$>&img=1&ref=noScript" alt="access" width="1" />
</noscript>
<mt:Else>
<mt:If name="datebased_archive">
<script type="text/javascript">
<!--
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTArchiveLink$>&img=1&scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&ref=", escape(parent.document.referrer), "' border=0 width=1 height=1>");
//-->
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTArchiveLink$>&img=1&ref=noScript" alt="access" width="1" />
</noscript>
<mt:Else>
<mt:If name="search_results">
<script type="text/javascript">
<!--
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=[search:<$mt:SearchString$>]<$MTBlogURL$>&img=1&scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&ref=", escape(parent.document.referrer), "' border=0 width=1 height=1>");
//-->
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=[search:<$mt:SearchString$>]<$MTBlogURL$>&img=1&ref=noScript" alt="access" width="1" />
</noscript>
<mt:Else>
<script type="text/javascript">
<!--
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTBlogURL$>&img=1&scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&ref=", escape(parent.document.referrer), "' border=0 width=1 height=1>");
//-->
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cgi?id=<$MTBlogURL$>&img=1&ref=noScript" alt="access" width="1" />
</noscript>
</mt:If>
</mt:If>
</mt:If>
</mt:If>
<!--アシアトログのタグここまで、この下にグーグルアナリティクスのタグを貼る-->
ここまで
アシアトログ(最新100件の個別アクセス記録ページ)
http://www.tohda.jp/cgi-bin/access/accview.cgi?dn=0-100
を見ると、
個別エントリー、カテゴリ、メインページ、検索ページの記録が取れていることがわかる。
記録をURL名としているところがポイント。URL名が記録に残るとアシアトをたぐりやすくなる。
![]()
|
