GravでGoogle analyticsを利用

目次

インストール

実行コマンド

bin/gpm install ganalytics

インストールログ

# bin/gpm install ganalytics

GPM Releases Configuration: <yellow>Stable</yellow>

Preparing to install <cyan>Google Analytics</cyan> [v1.4.0]
  |- Downloading package...   100%
  |- Checking destination...  <green>ok</green>
  |- Installing package...    <green>ok</green>
  '- <green>Success!</green>

<magenta>Clearing cache</magenta>

<red>Cleared:  </red>/var/www/grav/cache/twig/*
<red>Cleared:  </red>/var/www/grav/cache/doctrine/*
<red>Cleared:  </red>/var/www/grav/cache/compiled/*
<red>Cleared:  </red>/var/www/grav/assets/*
<red>Cleared:  </red>/var/www/grav/cache/twigfeeds/*

<red>Touched: </red>/var/www/grav/user/config/system.yaml

設定

  1. 予めGoogle-Analyticsのプロパティを作成
  2. Admin画面 -> Pages -> ganalyticsを選択
  3. プロパティIDを入力
  4. Save

Github

grav-ganalytics

目次
閉じる