質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,15 @@
|
|
1
1
|
現在の閲覧者数をサイト内で表示したいのですが、google analytics のAPIを用いれば可能でしょうか?
|
2
2
|
|
3
3
|
PHPで実装しようと思っています
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
追記:
|
8
|
+
|
9
|
+
https://developers.google.com/analytics/devguides/reporting/realtime/v3/reference/data/realtime/get?hl=ja#examples
|
10
|
+
|
11
|
+
上記のコードをコピペしたphpファイルを作成して、
|
12
|
+
|
13
|
+
こちら(https://developers.google.com/api-client-library/php/start/installation?hl=ja)に書かれているとおり、phpファイルの先頭で
|
14
|
+
|
15
|
+
require_once '/path/to/your-project/vendor/autoload.php'; を記述しているのですが、実行すると、15行目の $analytics インスタンスが未定義だと出ます
|