Google Analytics


(Ryan Morgan) #1

Matrix Version: 5.4.0.3

If anyone could help here that would be great.
I am attempting to connect up a Google Analytics connector.
I get all the way through being authenticated and asked to allow access, but then am sent back to my connector that doesn’t do anything at all! A blank page.

Error logs have the below:
0: Oauth2_Token::_parseStoreAccessToken (/var/www/dpac-internet-prod/packages/oauth2/oauth2_token/oauth2_token.inc line 325):
Array
(
[result] => HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Content-Type-Options: nosniff
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Tue, 06 Jun 2017 05:24:32 GMT
Content-Disposition: attachment; filename=“json.txt”; filename*=UTF-8’'json.txt
Server: ESF
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Alt-Svc: quic=":443"; ma=2592000; v=“38,37,36,35”
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

{
“access_token” : “ya29.GlthBAu9kEBCWgOMufE1a4S96VDO9AoCtHDcXxKBfI0zxDWNOXQJJJXk7CZx69kMYIHu8DivngcjeHHhFluYtxb2b26YO8vfEnu36qswtb3PzW1G7fZ6PzEPxR_8”,
“expires_in” : 3600,
“refresh_token” : “1/GNb0Nvxh0GgByU1jtSNd4hYZ6gufY6uNPxFyognYn_M”,
“token_type” : “Bearer”
}
[headers] => Array
(
)

[code] => 200
[content_type] => application/json; charset=utf-8

)
[2017-06-06 15:24:32][285460:Me][256:matrix error][R] (/packages/oauth2/oauth2_token/oauth2_token.inc:326) - There is no Access Token in response

Help?

Cheers,
R


(Bart Banda) #2

Last time I saw something like this it was the cause of the Matrix system sitting behind a proxy that was causing issues with the access token being stored. Any proxies in place that might be causing this?

Another thing to try, is to use the Oauth2 Token Asset and see if you can get a token stored that way, see how to do it here: https://matrix.squiz.net/tutorials/2017/how-to-integrate-with-ga-using-rest-and-oauth2


(Ryan Morgan) #3

Thanks Bart.
I suspect you might be right. I will take a deeper dive in that direction.
EDIT: Nailed it. Bypassed the proxy for any google related url and bang. Cheers Mate.

Cheers
Ryan