Web備忘録でタグ「Google」が付けられているもの
アクセス解析 Google Analytics のトラッキングコード(旧)は SSL と 非SSL ページでは別のものになるが、以下のような新トラッキングコードで、共通して使用が可能。
まずは...
非SSL ページ用の Google Analytics 旧トラッキングコード
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "xx-xxxxxx-x";
urchinTracker();
</script>
SSL ページ用の Google Analytics 旧トラッキングコード
<script src="http://ssl.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "xx-xxxxxx-x";
urchinTracker();
</script>
両者の違いは赤字(www or ssl)の部分
SSL 非SSL 共通の Google Analytics 新トラッキングコード
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._initData();
pageTracker._trackPageview();
</script>
※ 赤字の部分は自分のアカウントにより異なる
ブログを更新するたびにsitemap.xmlも更新される。また、MT4i用も作成可能。
サイトマップ for Movable Type 4
- 管理画面のテンプレートページに移動し、「インデックステンプレート」を作成
- テンプレートの名前を付ける
-
下記のソースを挿入
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc><$MTBlogURL encode_xml="1"$></loc> <lastmod><$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> <changefreq>daily</changefreq> </url> <MTIfArchiveTypeEnabled archive_type="Individual"> <MTEntries lastn="9999"> <url> <loc><$MTEntryPermalink encode_xml="1"$></loc> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> <priority>1.0</priority> </url> </MTEntries> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Monthly"> <MTArchiveList archive_type="Monthly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Weekly"> <MTArchiveList archive_type="Weekly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Daily"> <MTArchiveList archive_type="Daily"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Author"> <MTArchiveList archive_type="Author"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Author-Daily"> <MTArchiveList archive_type="Author-Daily"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Author-Weekly"> <MTArchiveList archive_type="Author-Weekly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Author-Monthly"> <MTArchiveList archive_type="Author-Monthly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Author-Yearly"> <MTArchiveList archive_type="Author-Yearly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Category"> <MTArchiveList archive_type="Category"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Category-Daily"> <MTArchiveList archive_type="Category-Daily"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Category-Weekly"> <MTArchiveList archive_type="Category-Weekly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Category-Monthly"> <MTArchiveList archive_type="Category-Monthly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Category-Yearly"> <MTArchiveList archive_type="Category-Yearly"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <MTIfArchiveTypeEnabled archive_type="Page"> <MTArchiveList archive_type="Page"> <url> <loc><$MTArchiveLink encode_xml="1"$></loc> <MTEntries lastn="1" sort_by="modified_on"> <lastmod><$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </MTEntries> </url> </MTArchiveList> </MTIfArchiveTypeEnabled> <url> <loc><$MTLink template="アーカイブインデックス" encode_xml="1"$></loc> <lastmod><$MTDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></lastmod> </url> </urlset> - 出力ファイル名に sitemap.xml と入力
- 保存と再構築
- サイトマップを検索エンジン(GoogleやYahoo)に通知