google-analytics-api

X509 certificate not loading private key file on server

我只是一个虾纸丫 提交于 2019-11-27 10:07:44
问题 I'm using the Google Analytics API and I followed this SO question to set up the OAuth: https://stackoverflow.com/a/13013265/1299363 Here is my OAuth code: public void SetupOAuth () { var Cert = new X509Certificate2( PrivateKeyPath, "notasecret", X509KeyStorageFlags.Exportable); var Provider = new AssertionFlowClient(GoogleAuthenticationServer.Description, Cert) { ServiceAccountId = ServiceAccountUser, Scope = ApiUrl + "analytics.readonly" }; var Auth = new OAuth2Authenticator

How do I use a Service Account to Access the Google Analytics API V3 with .NET C#?

风流意气都作罢 提交于 2019-11-27 07:08:07
I realized this question has been previously asked but with little in the way of example code, so I am asking again but with at least a little bit of direction. After hours of searching, I have come up with the following partial implementation. namespace GoogleAnalyticsAPITest.Console { using System.Security.Cryptography.X509Certificates; using DotNetOpenAuth.OAuth2; using Google.Apis.Analytics.v3; using Google.Apis.Analytics.v3.Data; using Google.Apis.Authentication.OAuth2; using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; class Program { static void Main(string[] args) { log4net.Config

Google Analytics Embed API: How to retireve access token?

﹥>﹥吖頭↗ 提交于 2019-11-27 06:25:17
问题 I've used the code provided in this question to gain access to the Google Analytics Embed API. I want to display the statistics from my website without the need for users with the correct privileges to log in (so no login screen). For that reason, I've created a service account and saved the p12 file. However, the following code displays an empty page. <!DOCTYPE html> <html> <head> <title>Embed API Demo</title> </head> <body> <section id="timeline"></section> <script> (function(w,d,s,g,js,fjs

Linker errors when trying to install new Google Analytics 3.0 Beta

五迷三道 提交于 2019-11-27 05:18:02
问题 I believe just today Google released a new update to their iOS Analytics frame work (version 3.0). When I follow the instructions and try to run the code, I get: Undefined symbols for architecture armv7: "_inflate", referenced from: l002 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_deflate", referenced from: l001 in libGoogleAnalyticsServices.a(NSData+zlib.o) " inflateInit2 ", referenced from: l002 in libGoogleAnalyticsServices.a(NSData+zlib.o) "_deflateEnd", referenced from: l001 in

Service Account Google Analytics OAuth AccessType = Offline C#

廉价感情. 提交于 2019-11-27 05:15:31
问题 I've got credentials of an account with access to Google Analytics, I'm looking to utilise the Analytics Core Reporting API http://code.google.com/apis/analytics/docs/gdata/home.html I've found examples which use username/password calling setUserCredentials, but have seen comments this is less secure/has a low request limit (And doesn't exist in the lastest client). Plus I've seem examples which use oauth, but require user interaction and grant access to the users google account. However I'm

Google API access using Service Account oauth2client.client.CryptoUnavailableError: No crypto library available

删除回忆录丶 提交于 2019-11-27 03:13:30
问题 I am trying to create a service account app so that I can access Google Analytics api using Python. Two things are confusing me. First, when I use the following code: `from oauth2client.client import SignedJwtAssertionCredentials client_email = "#####client_email#######.gserviceaccount.com" with open("XXXXXX.p12") as f: private_key = f.read() credentials = SignedJwtAssertionCredentials(client_email, private_key,'https://www.googleapis.com/auth/sqlservice.admin')` I get the following error:

Google API authentication: Not valid origin for the client

我是研究僧i 提交于 2019-11-27 02:07:34
问题 When making an auth request to the Google API (gapi), it's returning false on the checkOrigin. I have removed any client id's or anything that would link directly to my account and replaced it with a regex indicating what the data is for reference. Url: https://accounts.google.com/o/oauth2/iframerpc?action=checkOrigin&origin=https%3A%2F%2Flocal.tools&client_id=(\d{21}) My origin url is a local url, which is https://local.tools Result: {valid: false} I'm using the example found here without

Get Google Analytics “Visitors Flow” data from API

谁都会走 提交于 2019-11-27 01:53:58
问题 I'm trying to gather information from Google Analytics to build a recommendation engine for my site. The site consists of many pages, so I'm tracking the number of times a user clicks, for example, from page A to page B. Currently I can measure the A -> B transitions on Google Analytics with previousPagePath = '/A' and nextPagePath = '/B' , but the question I really want to answer is, "Of all the visits to the site that included viewing page A, how many times were pages B, C, ... viewed in

OAuth 2.0 with Google Analytics API v3

倖福魔咒の 提交于 2019-11-26 22:20:08
问题 I used to be able to query the Google Analytics API with my account's login & password. Google is now using OAuth for authentication which is great... The only issue is that I only need ONE access token. I don't wanna allow other users to fetch THEIR analytics data. I just wanna be able to fetch MY data. Is there a way I can generate an access token only for my app or my analytics account? I know such solutions exists... For instance, Twitter provides what they call a "single-user oauth" for

How to get Google Analytics credentials without gflags - using run_flow() instead?

白昼怎懂夜的黑 提交于 2019-11-26 20:54:43
问题 This may take a second to explain so please bear with me: I'm working on a project for work that requires me to pull in google analytics data. I originally did this following this link, so after installing the API client pip install --upgrade google-api-python-client and setting things up like the client_secrets.json , it wanted gflags to be installed in order to execute the run() statement. (i.e credentials = run(FLOW, storage) ) Now, I was getting the error message to install gflags or