google-analytics-api

Google API authentication: Not valid origin for the client

独自空忆成欢 提交于 2019-11-28 22:23:32
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 deviation (except for replacing clientid with my 21 digit clientid): https://ga-dev-tools.appspot.com

X509 certificate not loading private key file on server

时间秒杀一切 提交于 2019-11-28 16:59:14
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<AssertionFlowClient>(Provider, AssertionFlowClient.GetState); Service = new AnalyticsService(Auth); } PrivateKeyPath

How to pull Google Analytics stats?

落爺英雄遲暮 提交于 2019-11-28 15:12:21
问题 Is Google API Ruby client the best option? I have a site example.com with users and I want them to see their google analytics stats on example.com, how can I do it ? I can see the example but I'm not able to figure out how to begin. 回答1: I also use the google-api-ruby-client gem and set it up about the same way that is outlined in the link you provided (https://gist.github.com/joost/5344705). Just follow the steps outlined in the link to set up a Google Analytics client: # you need to set

Automated use of google-api-dotnet-client with OAuth 2.0

家住魔仙堡 提交于 2019-11-28 14:16:25
I have a bunch of keys : client id, client secret, api key But all the documentation show authentication using human interaction. How do I use the dot net libraries for interacting with the Google API v3 and the AnalyticsService without user interaction? If I just use the API Key, I get "Google.Apis.Requests.RequestError Login Required" There are no samples that I can find anywhere that do this. EDIT : this is for one Google Analytics account, I have full access to it, username, password, client id, client secret, api/developer key, everything. I just want to have the utility download data

Google Analytics - Sampled Data presents more sessions than API query

南楼画角 提交于 2019-11-28 12:30:49
问题 I'm working on automating a Google Analytics report using the Core Reporting API V3. When I request the data for a query that contains a segment I have previously defined, then the following scenario happens The metrics such as Sessions, Users and Pageviews that are reported by the query obtained with the API are higher than the ones showed in Google Analytics Reports. I noticed that in the Reports presented by GA they mention that they are sampled. This raises doubts since I would think that

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

送分小仙女□ 提交于 2019-11-28 09:47:57
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: `oauth2client.client.CryptoUnavailableError: No crypto library available` After doing a little research I

Get Google Analytics “Visitors Flow” data from API

别等时光非礼了梦想. 提交于 2019-11-28 07:38:34
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 the same visit?" For example, if the flow was A -> homepage -> B , then that would not be captured by my

Linker errors when trying to install new Google Analytics 3.0 Beta

二次信任 提交于 2019-11-28 04:17:28
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 libGoogleAnalyticsServices.a(NSData+zlib.o) "_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc

Service Account Google Analytics OAuth AccessType = Offline C#

半城伤御伤魂 提交于 2019-11-28 04:01:30
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 looking to run a service which doesn't require any user interaction, and connects to a predefined

Google Analytics API - retrieve Custom Segment Id by its name

筅森魡賤 提交于 2019-11-28 01:40:36
问题 Using Google Analytics API to retrieve 20+ Profiles' data so i can combine all of them into one set of data for analysis. (separate profiles are for different domains that all have identical content) I am using a Custom Segment on each Profile to remove referral spam. I have given the Custom Segments the same name eg 'referrer spam'. So I want to use these Custom Segments when retrieving records with the API. However have run into a challenge. I thought I could loop through the segments and