S
S
SilentSokolov2013-12-29 22:18:14
Python
SilentSokolov, 2013-12-29 22:18:14

Is there a more or less proven way to permanently connect to Google Analytics?

They write a server application that collects statistics from GA. I opened the documentation, read it, created the application, the authorization passes, I take the statistics. But here's the problem: authorization is reset after N days, that is, you have to open the link and take the code. According to Google, it is said to use the parameter access_type='offline'to pass authorization only once - it did not help, it still asks to log in after a while.
In general, the question is simple, if there is a more or less worked out method of authorization for server (background) applications, in order to log in once and not think about it anymore.
I am using python lib from google.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2014-12-30
@SilentSokolov

I can’t say about Python, but I myself wrote a PHP script that allows you to take data without authorization at all. That is (in my case) a person simply enters the site page, and ready-made charts are shown to him without any authorization. This is done using the Service account.
I hardly remember the technology itself, but I left myself references to the future. I think they will help you too:
blog.salteh.net/2012/10/google-analytics-api-and-s...
https://developers.google.com/accounts/docs/OAuth2...
https:// code.google.com/p/google-api-php-client/wi...
romantelychko.com/blog/523

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question