** google_analytics.inc.php [#ucc6ce10] |RIGHT:100|LEFT:360|c |~サマリ|Googleアナリティクスのコードを追加| |~リビジョン|1.0| |~対応バージョン|All (未確認)| |~投稿者|[[NoName]]| |~投稿日|&new{2016-01-18 (月) 13:43:11};| Googleアナリティクスのコードを追加するだけのプラグイン。&br; #google_analyticで追加。表示無し。&br; <body>~</body>の間に挿入されるため非推奨動作。((昔は推奨だったが現在は非推奨。一応動くらしい))&br; MenuBarやスキン等一度のみの実行を推奨。&br; **google_analytics.inc.php [#ncf24224] ***google_analytics.inc.php [#ncf24224] <?php define(ANALYTICS_ID, 'UA-0000000-0'); // 設定したいアナリティクスID function plugin_google_analytics_init() { $_id = ANALYTICS_ID; return <<<_TAG <!- GoogleAnalyticsStart --> <script type="text/javascript"><!-- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '{$_id}', 'auto'); ga('send', 'pageview'); // --></script> <!- GoogleAnalyticsEnd --> _TAG; } ?> **バグなど[#BugReport] #comment(noname,above)