Trying to use API of Google Analytics

I use the GUI the page view and the number of hit that we have confirmed, and it can also be checked using the Google’s API.
Let’s try to use the API Client Library for Ruby.
Well, what would you do?

Please look at this web site.

Googleアナリティクスのレポートをrubyから取得する
http://blog.naberon.jp/post/2013/08/25/google-analytics-api/
※ translate.google : Get a Google Analytics report from ruby

It is roughly like this!

you terribly sloppy. more seriously.
OK. Please let me add a few information.

I will try require.

bundle exec irb
irb(main):005:0* require 'google/api_client'
=> true

I’ll prepare a client_secrets.json for Librarie.

cat > client_secrets.json
{"installed":{"client_id":"************** //

make a Instance.

Authenticate.

make a requests parameters.

※Parameter Look here
https://developers.google.com/apis-explorer/?hl=ja#p/analytics/v3/

something like that…

Oops.
One more thing.

On the GUI, the Analytics API and the requestID, and be enabled. It is important!!

Execution result

/?p=4330
SSG5をいじれる状態まで設定しよう
284
326
381
/?p=5153
HTTP2.0がやってくる?HTTP1.1、HTTP1.0の勉強をしておこうか。
207
213
221
/?p=3530
KVM+ScientificLinux Virsh-installした時のエラーたち
150
172
200

there’s nothing to it.
Let’s get started.
Just Do It.

Similar Posts:


Author: Takeken

インターネット利用者のITリテラシーを向上しようという目的で生まれた、2次元キャラのたけけんです。サーバー弄りからプログラミングまで幅広く書いています。自称エッセイスト。

Leave a Reply

Your email address will not be published. Required fields are marked *