MT4の<MTIF>活用法、個別ページのアクセスのアシアトを追うアシアトログにMTタグを使いフッターに自動埋め込み

この記事は約10分で読めます。

Ashiatolog201アクセス解析ソフトの中には個別ページのアシアトを追うことができるものもある。そのひとつがアシアトログ。アシアトログはフリーソフトで、ver2以降は文字化けも少なく、機能も豊富なのでおすすめ。ただし、アシアトログを設定するにはすべてのページに特定できる独自の名前を入れたタグを埋め込む必要がある。この手間がかかる作業もMT4(ムーバブルタイプ)ならフッダに埋め込むだけでOK。MT4の<MTIF>を使えば簡単に設置できる。

さて、昨日は20位。今日は何位かな?⇒ぽちっとクリックお願いします

▼ここからフッターモジュールのタグに埋め込むアシアトログのタグの例

<$MTBlogURL$>cgi-bin/access/にアシアトログのシステムがある場合はこのままコピーでOK

<MTIf name="entry_template">
<script type="text/javascript">
<!–
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTEntryPermalink$>&amp;img=1&amp;scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1 height=1>");
//–>
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTEntryPermalink$>&amp;img=1&amp;ref=noScript" border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="Category_archive">
<script type="text/javascript">
<!–
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTCategoryArchiveLink$>&amp;img=1&amp;scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1 height=1>");
//–>
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTCategoryArchiveLink$>&amp;img=1&amp;ref=noScript" border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="search_results_template">
<script type="text/javascript">
<!–
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cg?id=[search]<$MTBlogURL$>&amp;img=1&amp;scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1 height=1>");
//–>
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cg?id=[search]<$MTBlogURL$>&amp;img=1&amp;ref=noScript" border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="main_index">
<script type="text/javascript">
<!–
document.write("<img src='<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTBlogURL$>&amp;img=1&amp;scr=", screen.width, "x", screen.height, "x", screen.colorDepth, "&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1 height=1>");
//–>
</script>
<noscript>
<img src="<$MTBlogURL$>cgi-bin/access/accimg.cg?id=<$MTBlogURL$>&amp;img=1&amp;ref=noScript" border=0 width=1 height=1>
</noscript>
</MTIf>

タグが改行などで切れていたら修正してください。
念のため「asiatomt.txt」
を用意しましたので、必要な方はダウンロードください。
上記と同じタグがテキストで手に入ります。

▼ここからフッターモジュールのタグに埋め込むアシアトログのタグの例(tohda.jpの例)

<MTIf name="entry_template">
<script type="text/javascript">
<!–
document.write("<img
src=’http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTEntryPermalink$>&amp;img=1&amp;scr=",
screen.width, "x", screen.height, "x", screen.colorDepth,
"&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1
height=1>");
//–>
</script>
<noscript>
<img
src="http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTEntryPermalink$>&amp;img=1&amp;ref=noScript"
border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="Category_archive">
<script type="text/javascript">
<!–
document.write("<img
src=’http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTCategoryArchiveLink$>&amp;img=1&amp;scr=",
screen.width, "x", screen.height, "x", screen.colorDepth,
"&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1
height=1>");
//–>
</script>
<noscript>
<img
src="http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTCategoryArchiveLink$>&amp;img=1&amp;ref=noScript"
border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="search_results_template">
<script type="text/javascript">
<!–
document.write("<img
src=’http://www.tohda.jp/cgi-bin/access/accimg.cg?id=[search]<$MTBlogURL$>&amp;img=1&amp;scr=",
screen.width, "x", screen.height, "x", screen.colorDepth,
"&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1
height=1>");
//–>
</script>
<noscript>
<img
src="http://www.tohda.jp/cgi-bin/access/accimg.cg?id=[search]<$MTBlogURL$>&amp;img=1&amp;ref=noScript"
border=0 width=1 height=1>
</noscript>
</MTIf>

<MTIf name="main_index">
<script type="text/javascript">
<!–
document.write("<img
src=’http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTBlogURL$>&amp;img=1&amp;scr=",
screen.width, "x", screen.height, "x", screen.colorDepth,
"&amp;ref=", escape(parent.document.referrer), "’ border=0 width=1
height=1>");
//–>
</script>
<noscript>
<img
src="http://www.tohda.jp/cgi-bin/access/accimg.cg?id=<$MTBlogURL$>&amp;img=1&amp;ref=noScript"
border=0 width=1 height=1>
</noscript>
</MTIf>

ここまで
太字の部分はアシアトログのURLに変更すること(注意)

アシアトログ(最新100件の個別アクセス記録ページ)
http://www.tohda.jp/cgi-bin/access/accview.cgi?dn=0-100
を見ると、
個別エントリー、カテゴリ、メインページ、検索ページの記録が取れていることがわかる。
記録をURL名としているところがポイント。URL名が記録に残るとアシアトをたぐりやすくなる。

コメント

  1. MT4ではアシアトログのタグを<MTIF>を使ってフッターに埋め込むことが可能

    MT4ではアシアトログのタグをMTIFを使ってフッターに埋め込む…

  2. MovableTypeのテンプレート名で検索結果表示用の「search_results_template」は「search_results」に変更されていた

    「search_results_template」に一致するコンテンツは見つかりませんでした。と表示されてしまった。この画面は「http://www.mo…